Notation used in Ruby API documentation
Module: lay
Description: A layout annotation (i.e. ruler)
Class hierarchy: Annotation
Annotation objects provide a way to attach measurements or descriptive information to a layout view. Annotation objects can appear as rulers for example. Annotation objects can be configured in different ways using the styles provided. By configuring an annotation object properly, it can appear as a rectangle or a plain line for example. See Ruler properties for more details about the appearance options.
Annotations are inserted into a layout view using LayoutView#insert_annotation. Here is some sample code in Ruby:
app = RBA::Application.instance mw = app.main_window view = mw.current_view ant = RBA::Annotation::new ant.p1 = RBA::DPoint::new(0, 0) ant.p2 = RBA::DPoint::new(100, 0) ant.style = RBA::Annotation::StyleRuler view.insert_annotation(ant)
Annotations can be retrieved from a view with LayoutView#each_annotation and all annotations can be cleared with LayoutView#clear_annotations.
Starting with version 0.25, annotations are 'live' objects once they are inserted into the view. Changing properties of annotations will automatically update the view (however, that is not true the other way round).
Here is some sample code of changing the style of all rulers to two-sided arrows:
view = RBA::LayoutView::current begin view.transaction("Restyle annotations") view.each_annotation do |a| a.style = RBA::Annotation::StyleArrowBoth end ensure view.commit end
new Annotation ptr | new | Creates a new object of this class |
[const] | bool | != | (const Annotation other) | Inequality operator |
[const] | bool | == | (const Annotation other) | Equality operator |
void | _assign | (const Annotation other) | Assigns another object to self | |
[const] | Annotation ptr | _const_cast | Returns a non-const reference to self. | |
void | _create | Ensures the C++ object is created | ||
void | _destroy | Explicitly destroys the object | ||
[const] | bool | _destroyed? | Returns a value indicating whether the object was already destroyed | |
[const] | new Annotation ptr | _dup | Creates a copy of self | |
[const] | bool | _is_const_object? | Returns a value indicating whether the reference is a const reference | |
void | _manage | Marks the object as managed by the script side. | ||
void | _unmanage | Marks the object as no longer owned by the script side. | ||
[const] | int | angle_constraint | Returns the angle constraint attribute | |
void | angle_constraint= | (int flag) | Sets the angle constraint attribute | |
void | assign | (const Annotation other) | Assigns another object to self | |
[const] | DBox | box | Gets the bounding box of the object (not including text) | |
[const] | string | category | Gets the category string | |
void | category= | (string cat) | Sets the category string of the annotation | |
void | delete | Deletes this annotation from the view | ||
void | detach | Detaches the annotation object from the view | ||
[const] | new Annotation ptr | dup | Creates a copy of self | |
[const] | string | fmt | Returns the format used for the label | |
void | fmt= | (string format) | Sets the format used for the label | |
[const] | string | fmt_x | Returns the format used for the x-axis label | |
void | fmt_x= | (string format) | Sets the format used for the x-axis label | |
[const] | string | fmt_y | Returns the format used for the y-axis label | |
void | fmt_y= | (string format) | Sets the format used for the y-axis label | |
[const] | int | id | Returns the annotation's ID | |
[const] | bool | is_valid? | Returns a value indicating whether the object is a valid reference. | |
[const] | int | main_position | Gets the position of the main label | |
void | main_position= | (int pos) | Sets the position of the main label | |
[const] | int | main_xalign | Gets the horizontal alignment type of the main label | |
void | main_xalign= | (int align) | Sets the horizontal alignment type of the main label | |
[const] | int | main_yalign | Gets the vertical alignment type of the main label | |
void | main_yalign= | (int align) | Sets the vertical alignment type of the main label | |
[const] | int | outline | Returns the outline style of the annotation object | |
void | outline= | (int outline) | Sets the outline style used for drawing the annotation object | |
[const] | DPoint | p1 | Gets the first point of the ruler or marker | |
void | p1= | (const DPoint point) | Sets the first point of the ruler or marker | |
[const] | DPoint | p2 | Gets the second point of the ruler or marker | |
void | p2= | (const DPoint point) | Sets the second point of the ruler or marker | |
[const] | DPoint[] | points | Gets the points of the ruler | |
void | points= | (DPoint[] points) | Sets the points for a (potentially) multi-segmented ruler | |
[const] | DPoint | seg_p1 | (unsigned long segment_index) | Gets the first point of the given segment. |
[const] | DPoint | seg_p2 | (unsigned long segment_index) | Gets the second point of the given segment. |
[const] | unsigned long | segments | Gets the number of segments. | |
void | snap= | (bool flag) | Sets the 'snap to objects' attribute | |
[const] | bool | snap? | Returns the 'snap to objects' attribute | |
[const] | int | style | Returns the style of the annotation object | |
void | style= | (int style) | Sets the style used for drawing the annotation object | |
[const] | string | text | (unsigned long index = 0) | Returns the formatted text for the main label |
[const] | string | text_x | (unsigned long index = 0) | Returns the formatted text for the x-axis label |
[const] | string | text_y | (unsigned long index = 0) | Returns the formatted text for the y-axis label |
[const] | string | to_s | Returns the string representation of the ruler | |
[const] | Annotation | transformed | (const DTrans t) | Transforms the ruler or marker with the given simple transformation |
[const] | Annotation | transformed | (const DCplxTrans t) | Transforms the ruler or marker with the given complex transformation |
[const] | Annotation | transformed | (const ICplxTrans t) | Transforms the ruler or marker with the given complex transformation |
[const] | int | xlabel_xalign | Gets the horizontal alignment type of the x axis label | |
void | xlabel_xalign= | (int align) | Sets the horizontal alignment type of the x axis label | |
[const] | int | xlabel_yalign | Gets the vertical alignment type of the x axis label | |
void | xlabel_yalign= | (int align) | Sets the vertical alignment type of the x axis label | |
[const] | int | ylabel_xalign | Gets the horizontal alignment type of the y axis label | |
void | ylabel_xalign= | (int align) | Sets the horizontal alignment type of the y axis label | |
[const] | int | ylabel_yalign | Gets the vertical alignment type of the y axis label | |
void | ylabel_yalign= | (int align) | Sets the vertical alignment type of the y axis label |
int | AlignAuto | This code indicates automatic alignment. | ||
int | AlignBottom | This code indicates bottom alignment. | ||
int | AlignCenter | This code indicates automatic alignment. | ||
int | AlignDown | This code indicates left or bottom alignment, depending on the context. | ||
int | AlignLeft | This code indicates left alignment. | ||
int | AlignRight | This code indicates right alignment. | ||
int | AlignTop | This code indicates top alignment. | ||
int | AlignUp | This code indicates right or top alignment, depending on the context. | ||
int | AngleAny | Gets the any angle code for use with the angle_constraint method | ||
int | AngleDiagonal | Gets the diagonal angle code for use with the angle_constraint method | ||
int | AngleGlobal | Gets the global angle code for use with the angle_constraint method. | ||
int | AngleHorizontal | Gets the horizontal angle code for use with the angle_constraint method | ||
int | AngleOrtho | Gets the ortho angle code for use with the angle_constraint method | ||
int | AngleVertical | Gets the vertical angle code for use with the angle_constraint method | ||
int | OutlineAngle | Gets the angle measurement ruler outline code for use with the outline method | ||
int | OutlineBox | Gets the box outline code for use with the outline method | ||
int | OutlineDiag | Gets the diagonal output code for use with the outline method | ||
int | OutlineDiagXY | outline_xy code used by the outline method | ||
int | OutlineDiagYX | Gets the yx plus diagonal outline code for use with the outline method | ||
int | OutlineEllipse | Gets the ellipse outline code for use with the outline method | ||
int | OutlineRadius | Gets the radius measurement ruler outline code for use with the outline method | ||
int | OutlineXY | Gets the xy outline code for use with the outline method | ||
int | OutlineYX | Gets the yx outline code for use with the outline method | ||
int | PositionAuto | This code indicates automatic positioning. | ||
int | PositionCenter | This code indicates positioning of the main label at the mid point between p1 and p2. | ||
int | PositionP1 | This code indicates positioning of the main label at p1. | ||
int | PositionP2 | This code indicates positioning of the main label at p2. | ||
int | RulerModeAutoMetric | Specifies auto-metric ruler mode for the register_template method | ||
int | RulerModeAutoMetricEdge | Specifies edge-sensitive auto-metric ruler mode for the register_template method | ||
int | RulerModeNormal | Specifies normal ruler mode for the register_template method | ||
int | RulerModeSingleClick | Specifies single-click ruler mode for the register_template method | ||
int | RulerMultiSegment | Specifies multi-segment mode | ||
int | RulerThreeClicks | Specifies three-click ruler mode for the register_template method | ||
int | StyleArrowBoth | Gets the both arrow ends style code for use the style method | ||
int | StyleArrowEnd | Gets the end arrow style code for use the style method | ||
int | StyleArrowStart | Gets the start arrow style code for use the style method | ||
int | StyleCrossBoth | Gets the line style code for use with the style method | ||
int | StyleCrossEnd | Gets the line style code for use with the style method | ||
int | StyleCrossStart | Gets the line style code for use with the style method | ||
int | StyleLine | Gets the line style code for use with the style method | ||
int | StyleRuler | Gets the ruler style code for use the style method | ||
new Annotation ptr | from_s | (string s) | Creates a ruler from a string representation | |
void | register_template | (const Annotation annotation, string title, int mode = RulerModeNormal) | Registers the given annotation as a template globally | |
void | unregister_templates | (string category) | Unregisters the template or templates with the given category string globally |
void | create | Use of this method is deprecated. Use _create instead | ||
void | destroy | Use of this method is deprecated. Use _destroy instead | ||
[const] | bool | destroyed? | Use of this method is deprecated. Use _destroyed? instead | |
[const] | bool | is_const_object? | Use of this method is deprecated. Use _is_const_object? instead | |
[const] | Annotation | transformed_cplx | (const DCplxTrans t) | Use of this method is deprecated. Use transformed instead |
[const] | Annotation | transformed_cplx | (const ICplxTrans t) | Use of this method is deprecated. Use transformed instead |
!= | Signature: [const] bool != (const Annotation other) Description: Inequality operator | ||||
== | Signature: [const] bool == (const Annotation other) Description: Equality operator | ||||
AlignAuto | Signature: [static] int AlignAuto Description: This code indicates automatic alignment. This code makes the annotation align the label the way it thinks is best. This constant has been introduced in version 0.25. Python specific notes: | ||||
AlignBottom | Signature: [static] int AlignBottom Description: This code indicates bottom alignment. If used in a vertical context, this alignment code makes the label aligned at the bottom side - i.e. it will appear top of the reference point. This constant has been introduced in version 0.25. Python specific notes: | ||||
AlignCenter | Signature: [static] int AlignCenter Description: This code indicates automatic alignment. This code makes the annotation align the label centered. When used in a horizontal context, centering is in horizontal direction. If used in a vertical context, centering is in vertical direction. This constant has been introduced in version 0.25. Python specific notes: | ||||
AlignDown | Signature: [static] int AlignDown Description: This code indicates left or bottom alignment, depending on the context. This code is equivalent to AlignLeft and AlignBottom. This constant has been introduced in version 0.25. Python specific notes: | ||||
AlignLeft | Signature: [static] int AlignLeft Description: This code indicates left alignment. If used in a horizontal context, this alignment code makes the label aligned at the left side - i.e. it will appear right of the reference point. This constant has been introduced in version 0.25. Python specific notes: | ||||
AlignRight | Signature: [static] int AlignRight Description: This code indicates right alignment. If used in a horizontal context, this alignment code makes the label aligned at the right side - i.e. it will appear left of the reference point. This constant has been introduced in version 0.25. Python specific notes: | ||||
AlignTop | Signature: [static] int AlignTop Description: This code indicates top alignment. If used in a vertical context, this alignment code makes the label aligned at the top side - i.e. it will appear bottom of the reference point. This constant has been introduced in version 0.25. Python specific notes: | ||||
AlignUp | Signature: [static] int AlignUp Description: This code indicates right or top alignment, depending on the context. This code is equivalent to AlignRight and AlignTop. This constant has been introduced in version 0.25. Python specific notes: | ||||
AngleAny | Signature: [static] int AngleAny Description: Gets the any angle code for use with the angle_constraint method If this value is specified for the angle constraint, all angles will be allowed. Python specific notes: | ||||
AngleDiagonal | Signature: [static] int AngleDiagonal Description: Gets the diagonal angle code for use with the angle_constraint method If this value is specified for the angle constraint, only multiples of 45 degree are allowed. Python specific notes: | ||||
AngleGlobal | Signature: [static] int AngleGlobal Description: Gets the global angle code for use with the angle_constraint method. This code will tell the ruler or marker to use the angle constraint defined globally. Python specific notes: | ||||
AngleHorizontal | Signature: [static] int AngleHorizontal Description: Gets the horizontal angle code for use with the angle_constraint method If this value is specified for the angle constraint, only horizontal rulers are allowed. Python specific notes: | ||||
AngleOrtho | Signature: [static] int AngleOrtho Description: Gets the ortho angle code for use with the angle_constraint method If this value is specified for the angle constraint, only multiples of 90 degree are allowed. Python specific notes: | ||||
AngleVertical | Signature: [static] int AngleVertical Description: Gets the vertical angle code for use with the angle_constraint method If this value is specified for the angle constraint, only vertical rulers are allowed. Python specific notes: | ||||
OutlineAngle | Signature: [static] int OutlineAngle Description: Gets the angle measurement ruler outline code for use with the outline method When this outline style is specified, the ruler is drawn to indicate the angle between the first and last segment. This constant has been introduced in version 0.28. Python specific notes: | ||||
OutlineBox | Signature: [static] int OutlineBox Description: Gets the box outline code for use with the outline method When this outline style is specified, a box is drawn with the corners specified by the start and end point. All box edges are drawn in the style specified with the style attribute. Python specific notes: | ||||
OutlineDiag | Signature: [static] int OutlineDiag Description: Gets the diagonal output code for use with the outline method When this outline style is specified, a line connecting start and end points in the given style (ruler, arrow or plain line) is drawn. Python specific notes: | ||||
OutlineDiagXY | Signature: [static] int OutlineDiagXY Description: outline_xy code used by the outline method When this outline style is specified, three lines are drawn: one horizontal from left to right and attached to the end of that a line from the bottom to the top. Another line is drawn connecting the start and end points directly. The lines are drawn in the specified style (see style method). Python specific notes: | ||||
OutlineDiagYX | Signature: [static] int OutlineDiagYX Description: Gets the yx plus diagonal outline code for use with the outline method When this outline style is specified, three lines are drawn: one vertical from bottom to top and attached to the end of that a line from the left to the right. Another line is drawn connecting the start and end points directly. The lines are drawn in the specified style (see style method). Python specific notes: | ||||
OutlineEllipse | Signature: [static] int OutlineEllipse Description: Gets the ellipse outline code for use with the outline method When this outline style is specified, an ellipse is drawn with the extensions specified by the start and end point. The contour drawn as a line. This constant has been introduced in version 0.26. Python specific notes: | ||||
OutlineRadius | Signature: [static] int OutlineRadius Description: Gets the radius measurement ruler outline code for use with the outline method When this outline style is specified, the ruler is drawn to indicate a radius defined by at least three points of the ruler. This constant has been introduced in version 0.28. Python specific notes: | ||||
OutlineXY | Signature: [static] int OutlineXY Description: Gets the xy outline code for use with the outline method When this outline style is specified, two lines are drawn: one horizontal from left to right and attached to the end of that a line from the bottom to the top. The lines are drawn in the specified style (see style method). Python specific notes: | ||||
OutlineYX | Signature: [static] int OutlineYX Description: Gets the yx outline code for use with the outline method When this outline style is specified, two lines are drawn: one vertical from bottom to top and attached to the end of that a line from the left to the right. The lines are drawn in the specified style (see style method). Python specific notes: | ||||
PositionAuto | Signature: [static] int PositionAuto Description: This code indicates automatic positioning. The main label will be put either to p1 or p2, whichever the annotation considers best. This constant has been introduced in version 0.25. Python specific notes: | ||||
PositionCenter | Signature: [static] int PositionCenter Description: This code indicates positioning of the main label at the mid point between p1 and p2. The main label will be put to the center point. This constant has been introduced in version 0.25. Python specific notes: | ||||
PositionP1 | Signature: [static] int PositionP1 Description: This code indicates positioning of the main label at p1. The main label will be put to p1. This constant has been introduced in version 0.25. Python specific notes: | ||||
PositionP2 | Signature: [static] int PositionP2 Description: This code indicates positioning of the main label at p2. The main label will be put to p2. This constant has been introduced in version 0.25. Python specific notes: | ||||
RulerModeAutoMetric | Signature: [static] int RulerModeAutoMetric Description: Specifies auto-metric ruler mode for the register_template method In auto-metric mode, a ruler can be placed with a single click and p1/p2 will be determined from the neighborhood. This constant has been introduced in version 0.25 Python specific notes: | ||||
RulerModeAutoMetricEdge | Signature: [static] int RulerModeAutoMetricEdge Description: Specifies edge-sensitive auto-metric ruler mode for the register_template method In auto-metric mode, a ruler can be placed with a single click and p1/p2 will be determined from the edge it is placed on. This constant has been introduced in version 0.29 Python specific notes: | ||||
RulerModeNormal | Signature: [static] int RulerModeNormal Description: Specifies normal ruler mode for the register_template method This constant has been introduced in version 0.25 Python specific notes: | ||||
RulerModeSingleClick | Signature: [static] int RulerModeSingleClick Description: Specifies single-click ruler mode for the register_template method In single click-mode, a ruler can be placed with a single click and p1 will be == p2. This constant has been introduced in version 0.25 Python specific notes: | ||||
RulerMultiSegment | Signature: [static] int RulerMultiSegment Description: Specifies multi-segment mode In multi-segment mode, multiple segments can be created. The ruler is finished with a double click. This constant has been introduced in version 0.28 Python specific notes: | ||||
RulerThreeClicks | Signature: [static] int RulerThreeClicks Description: Specifies three-click ruler mode for the register_template method In this ruler mode, two segments are created for angle and circle radius measurements. Three mouse clicks are required. This constant has been introduced in version 0.28 Python specific notes: | ||||
StyleArrowBoth | Signature: [static] int StyleArrowBoth Description: Gets the both arrow ends style code for use the style method When this style is specified, a two-headed arrow is drawn. Python specific notes: | ||||
StyleArrowEnd | Signature: [static] int StyleArrowEnd Description: Gets the end arrow style code for use the style method When this style is specified, an arrow is drawn pointing from the start to the end point. Python specific notes: | ||||
StyleArrowStart | Signature: [static] int StyleArrowStart Description: Gets the start arrow style code for use the style method When this style is specified, an arrow is drawn pointing from the end to the start point. Python specific notes: | ||||
StyleCrossBoth | Signature: [static] int StyleCrossBoth Description: Gets the line style code for use with the style method When this style is specified, a cross is drawn at both points. This constant has been added in version 0.26. Python specific notes: | ||||
StyleCrossEnd | Signature: [static] int StyleCrossEnd Description: Gets the line style code for use with the style method When this style is specified, a cross is drawn at the end point. This constant has been added in version 0.26. Python specific notes: | ||||
StyleCrossStart | Signature: [static] int StyleCrossStart Description: Gets the line style code for use with the style method When this style is specified, a cross is drawn at the start point. This constant has been added in version 0.26. Python specific notes: | ||||
StyleLine | Signature: [static] int StyleLine Description: Gets the line style code for use with the style method When this style is specified, a plain line is drawn. Python specific notes: | ||||
StyleRuler | Signature: [static] int StyleRuler Description: Gets the ruler style code for use the style method When this style is specified, the annotation will show a ruler with some ticks at distances indicating a decade of units and a suitable subdivision into minor ticks at intervals of 1, 2 or 5 units. Python specific notes: | ||||
_assign | Signature: void _assign (const Annotation other) Description: Assigns another object to self | ||||
_const_cast | Signature: [const] Annotation ptr _const_cast Description: Returns a non-const reference to self. Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects. This method has been introduced in version 0.29.6. | ||||
_create | Signature: void _create Description: Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. | ||||
_destroy | Signature: void _destroy Description: Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing. | ||||
_destroyed? | Signature: [const] bool _destroyed? Description: Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself. | ||||
_dup | Signature: [const] new Annotation ptr _dup Description: Creates a copy of self | ||||
_is_const_object? | Signature: [const] bool _is_const_object? Description: Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self. | ||||
_manage | Signature: void _manage Description: Marks the object as managed by the script side. After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. Usually it's not required to call this method. It has been introduced in version 0.24. | ||||
_unmanage | Signature: void _unmanage Description: Marks the object as no longer owned by the script side. Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. Usually it's not required to call this method. It has been introduced in version 0.24. | ||||
angle_constraint | Signature: [const] int angle_constraint Description: Returns the angle constraint attribute See angle_constraint= for a more detailed description. Python specific notes: | ||||
angle_constraint= | Signature: void angle_constraint= (int flag) Description: Sets the angle constraint attribute This attribute controls if an angle constraint is applied when moving one of the ruler's points. The Angle... values can be used for this purpose. Python specific notes: | ||||
assign | Signature: void assign (const Annotation other) Description: Assigns another object to self | ||||
box | Signature: [const] DBox box Description: Gets the bounding box of the object (not including text)
| ||||
category | Signature: [const] string category Description: Gets the category string See category= for details. This method has been introduced in version 0.25 Python specific notes: | ||||
category= | Signature: void category= (string cat) Description: Sets the category string of the annotation The category string is an arbitrary string that can be used by various consumers or generators to mark 'their' annotation. This method has been introduced in version 0.25 Python specific notes: | ||||
create | Signature: void create Description: Ensures the C++ object is created Use of this method is deprecated. Use _create instead Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. | ||||
delete | Signature: void delete Description: Deletes this annotation from the view If the annotation is an "active" one, this method will remove it from the view. This object will become detached and can still be manipulated, but without having an effect on the view. This method has been introduced in version 0.25. | ||||
destroy | Signature: void destroy Description: Explicitly destroys the object Use of this method is deprecated. Use _destroy instead Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing. | ||||
destroyed? | Signature: [const] bool destroyed? Description: Returns a value indicating whether the object was already destroyed Use of this method is deprecated. Use _destroyed? instead This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself. | ||||
detach | Signature: void detach Description: Detaches the annotation object from the view If the annotation object was inserted into the view, property changes will be reflected in the view. To disable this feature, 'detach' can be called after which the annotation object becomes inactive and changes will no longer be reflected in the view. This method has been introduced in version 0.25. | ||||
dup | Signature: [const] new Annotation ptr dup Description: Creates a copy of self Python specific notes: | ||||
fmt | Signature: [const] string fmt Description: Returns the format used for the label
Format strings can contain placeholders for values and formulas for computing derived values. See Ruler properties for more details. Python specific notes: | ||||
fmt= | Signature: void fmt= (string format) Description: Sets the format used for the label
Format strings can contain placeholders for values and formulas for computing derived values. See Ruler properties for more details. Python specific notes: | ||||
fmt_x | Signature: [const] string fmt_x Description: Returns the format used for the x-axis label
Format strings can contain placeholders for values and formulas for computing derived values. See Ruler properties for more details. Python specific notes: | ||||
fmt_x= | Signature: void fmt_x= (string format) Description: Sets the format used for the x-axis label
X-axis labels are only used for styles that have a horizontal component. Format strings can contain placeholders for values and formulas for computing derived values. See Ruler properties for more details. Python specific notes: | ||||
fmt_y | Signature: [const] string fmt_y Description: Returns the format used for the y-axis label
Format strings can contain placeholders for values and formulas for computing derived values. See Ruler properties for more details. Python specific notes: | ||||
fmt_y= | Signature: void fmt_y= (string format) Description: Sets the format used for the y-axis label
Y-axis labels are only used for styles that have a vertical component. Format strings can contain placeholders for values and formulas for computing derived values. See Ruler properties for more details. Python specific notes: | ||||
from_s | Signature: [static] new Annotation ptr from_s (string s) Description: Creates a ruler from a string representation This function creates a ruler from the string returned by to_s. This method was introduced in version 0.28. | ||||
id | Signature: [const] int id Description: Returns the annotation's ID The annotation ID is an integer that uniquely identifies an annotation inside a view. The ID is used for replacing an annotation (see LayoutView#replace_annotation). This method was introduced in version 0.24. | ||||
is_const_object? | Signature: [const] bool is_const_object? Description: Returns a value indicating whether the reference is a const reference Use of this method is deprecated. Use _is_const_object? instead This method returns true, if self is a const reference. In that case, only const methods may be called on self. | ||||
is_valid? | Signature: [const] bool is_valid? Description: Returns a value indicating whether the object is a valid reference. If this value is true, the object represents an annotation on the screen. Otherwise, the object is a 'detached' annotation which does not have a representation on the screen. This method was introduced in version 0.25. | ||||
main_position | Signature: [const] int main_position Description: Gets the position of the main label See main_position= for details. This method has been introduced in version 0.25 Python specific notes: | ||||
main_position= | Signature: void main_position= (int pos) Description: Sets the position of the main label This method accepts one of the Position... constants. This method has been introduced in version 0.25 Python specific notes: | ||||
main_xalign | Signature: [const] int main_xalign Description: Gets the horizontal alignment type of the main label See main_xalign= for details. This method has been introduced in version 0.25 Python specific notes: | ||||
main_xalign= | Signature: void main_xalign= (int align) Description: Sets the horizontal alignment type of the main label This method accepts one of the Align... constants. This method has been introduced in version 0.25 Python specific notes: | ||||
main_yalign | Signature: [const] int main_yalign Description: Gets the vertical alignment type of the main label See main_yalign= for details. This method has been introduced in version 0.25 Python specific notes: | ||||
main_yalign= | Signature: void main_yalign= (int align) Description: Sets the vertical alignment type of the main label This method accepts one of the Align... constants. This method has been introduced in version 0.25 Python specific notes: | ||||
new | Signature: [static] new Annotation ptr new Description: Creates a new object of this class Python specific notes: | ||||
outline | Signature: [const] int outline Description: Returns the outline style of the annotation object Python specific notes: | ||||
outline= | Signature: void outline= (int outline) Description: Sets the outline style used for drawing the annotation object The Outline... values can be used for defining the annotation object's outline. The outline style determines what components are drawn. Python specific notes: | ||||
p1 | Signature: [const] DPoint p1 Description: Gets the first point of the ruler or marker
The points of the ruler or marker are always given in micron units in floating-point coordinates. This method is provided for backward compatibility. Starting with version 0.28, rulers can be multi-segmented. Use points or seg_p1 to retrieve the points of the ruler segments. Python specific notes: | ||||
p1= | Signature: void p1= (const DPoint point) Description: Sets the first point of the ruler or marker The points of the ruler or marker are always given in micron units in floating-point coordinates. This method is provided for backward compatibility. Starting with version 0.28, rulers can be multi-segmented. Use points= to specify the ruler segments. Python specific notes: | ||||
p2 | Signature: [const] DPoint p2 Description: Gets the second point of the ruler or marker
The points of the ruler or marker are always given in micron units in floating-point coordinates. This method is provided for backward compatibility. Starting with version 0.28, rulers can be multi-segmented. Use points or seg_p1 to retrieve the points of the ruler segments. Python specific notes: | ||||
p2= | Signature: void p2= (const DPoint point) Description: Sets the second point of the ruler or marker The points of the ruler or marker are always given in micron units in floating-point coordinates. This method is provided for backward compatibility. Starting with version 0.28, rulers can be multi-segmented. Use points= to specify the ruler segments. Python specific notes: | ||||
points | Signature: [const] DPoint[] points Description: Gets the points of the ruler A single-segmented ruler has two points. Rulers with more points have more segments correspondingly. Note that the point list may have one point only (single-point ruler) or may even be empty. Use points= to set the segment points. Use segments to get the number of segments and seg_p1 and seg_p2 to get the first and second point of one segment. Multi-segmented rulers have been introduced in version 0.28 Python specific notes: | ||||
points= | Signature: void points= (DPoint[] points) Description: Sets the points for a (potentially) multi-segmented ruler See points for a description of multi-segmented rulers. The list of points passed to this method is cleaned from duplicates before being stored inside the ruler. This method has been introduced in version 0.28. Python specific notes: | ||||
register_template | Signature: [static] void register_template (const Annotation annotation, string title, int mode = RulerModeNormal) Description: Registers the given annotation as a template globally
@annotation The annotation to use for the template (positions are ignored) In order to register a system template, the category string of the annotation has to be a unique and non-empty string. The annotation is added to the list of annotation templates and becomes available as a new template in the ruler drop-down menu. The new annotation template is registered on all views. NOTE: this setting is persisted and the the application configuration is updated. This method has been added in version 0.25. | ||||
seg_p1 | Signature: [const] DPoint seg_p1 (unsigned long segment_index) Description: Gets the first point of the given segment. The segment is indicated by the segment index which is a number between 0 and segments-1. This method has been introduced in version 0.28. | ||||
seg_p2 | Signature: [const] DPoint seg_p2 (unsigned long segment_index) Description: Gets the second point of the given segment. The segment is indicated by the segment index which is a number between 0 and segments-1. The second point of a segment is also the first point of the following segment if there is one. This method has been introduced in version 0.28. | ||||
segments | Signature: [const] unsigned long segments Description: Gets the number of segments. This method returns the number of segments the ruler is made up. Even though the ruler can be one or even zero points, the number of segments is at least 1. This method has been introduced in version 0.28. | ||||
snap= | Signature: void snap= (bool flag) Description: Sets the 'snap to objects' attribute If this attribute is set to true, the ruler or marker snaps to other objects when moved. Python specific notes: | ||||
snap? | Signature: [const] bool snap? Description: Returns the 'snap to objects' attribute Python specific notes: | ||||
style | Signature: [const] int style Description: Returns the style of the annotation object Python specific notes: | ||||
style= | Signature: void style= (int style) Description: Sets the style used for drawing the annotation object The Style... values can be used for defining the annotation object's style. The style determines if ticks or arrows are drawn. Python specific notes: | ||||
text | Signature: [const] string text (unsigned long index = 0) Description: Returns the formatted text for the main label The index parameter indicates which segment to use (0 is the first one). It has been added in version 0.28. | ||||
text_x | Signature: [const] string text_x (unsigned long index = 0) Description: Returns the formatted text for the x-axis label The index parameter indicates which segment to use (0 is the first one). It has been added in version 0.28. | ||||
text_y | Signature: [const] string text_y (unsigned long index = 0) Description: Returns the formatted text for the y-axis label The index parameter indicates which segment to use (0 is the first one). It has been added in version 0.28. | ||||
to_s | Signature: [const] string to_s Description: Returns the string representation of the ruler This method was introduced in version 0.19. Python specific notes: | ||||
transformed | (1) Signature: [const] Annotation transformed (const DTrans t) Description: Transforms the ruler or marker with the given simple transformation
| ||||
(2) Signature: [const] Annotation transformed (const DCplxTrans t) Description: Transforms the ruler or marker with the given complex transformation
Starting with version 0.25, all overloads all available as 'transform'. | |||||
(3) Signature: [const] Annotation transformed (const ICplxTrans t) Description: Transforms the ruler or marker with the given complex transformation
This method has been introduced in version 0.18. Starting with version 0.25, all overloads all available as 'transform'. | |||||
transformed_cplx | (1) Signature: [const] Annotation transformed_cplx (const DCplxTrans t) Description: Transforms the ruler or marker with the given complex transformation
Use of this method is deprecated. Use transformed instead Starting with version 0.25, all overloads all available as 'transform'. | ||||
(2) Signature: [const] Annotation transformed_cplx (const ICplxTrans t) Description: Transforms the ruler or marker with the given complex transformation
Use of this method is deprecated. Use transformed instead This method has been introduced in version 0.18. Starting with version 0.25, all overloads all available as 'transform'. | |||||
unregister_templates | Signature: [static] void unregister_templates (string category) Description: Unregisters the template or templates with the given category string globally This method will remove all templates with the given category string. If the category string is empty, all templates are removed. NOTE: this setting is persisted and the the application configuration is updated. This method has been added in version 0.28. | ||||
xlabel_xalign | Signature: [const] int xlabel_xalign Description: Gets the horizontal alignment type of the x axis label See xlabel_xalign= for details. This method has been introduced in version 0.25 Python specific notes: | ||||
xlabel_xalign= | Signature: void xlabel_xalign= (int align) Description: Sets the horizontal alignment type of the x axis label This method accepts one of the Align... constants. This method has been introduced in version 0.25 Python specific notes: | ||||
xlabel_yalign | Signature: [const] int xlabel_yalign Description: Gets the vertical alignment type of the x axis label See xlabel_yalign= for details. This method has been introduced in version 0.25 Python specific notes: | ||||
xlabel_yalign= | Signature: void xlabel_yalign= (int align) Description: Sets the vertical alignment type of the x axis label This method accepts one of the Align... constants. This method has been introduced in version 0.25 Python specific notes: | ||||
ylabel_xalign | Signature: [const] int ylabel_xalign Description: Gets the horizontal alignment type of the y axis label See ylabel_xalign= for details. This method has been introduced in version 0.25 Python specific notes: | ||||
ylabel_xalign= | Signature: void ylabel_xalign= (int align) Description: Sets the horizontal alignment type of the y axis label This method accepts one of the Align... constants. This method has been introduced in version 0.25 Python specific notes: | ||||
ylabel_yalign | Signature: [const] int ylabel_yalign Description: Gets the vertical alignment type of the y axis label See ylabel_yalign= for details. This method has been introduced in version 0.25 Python specific notes: | ||||
ylabel_yalign= | Signature: void ylabel_yalign= (int align) Description: Sets the vertical alignment type of the y axis label This method accepts one of the Align... constants. This method has been introduced in version 0.25 Python specific notes: |