API reference - Class AnnotationNotation used in Ruby API documentation Description: A layout annotation (i.e. ruler)
Annotation objects provide a way to attach measurements or descriptive informations 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 the 'insert_annotation' method of LayoutView. 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 the 'each_annotation' iterator of LayoutView and all annotations can be cleared with 'clear_annotations'. In version 0.22, the constants have been converted to upper-case constants which is compliant with Ruby's naming convention for constants. Public constructors
Public methods
Public static methods and constants
Deprecated methods (protected, public, static, non-static and constructors)
Detailed description[const] bool !=(const Annotation arg1)Description: Inequality operator [const] bool ==(const Annotation arg1)Description: Equality operator [static] int AngleAnyDescription: angle_any code used by the angle_constraint method If this value is specified for the angle constraint, all angles will be allowed. [static] int AngleDiagonalDescription: angle_diagonal code used by the angle_constraint method If this value is specified for the angle constraint, only multiples of 45 degree are allowed. [static] int AngleGlobalDescription: angle_global code used by the angle_constraint method. This code will tell the ruler or marker to use the angle constraint defined globally. [static] int AngleHorizontalDescription: angle_horizontal code used by the angle_constraint method If this value is specified for the angle constraint, only horizontal rulers are allowed. [static] int AngleOrthoDescription: angle_ortho code used by the angle_constraint method If this value is specified for the angle constraint, only multiples of 90 degree are allowed. [static] int AngleVerticalDescription: angle_vertical code used by the angle_constraint method If this value is specified for the angle constraint, only vertical rulers are allowed. [static] int OutlineBoxDescription: outline_box code used by 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. [static] int OutlineDiagDescription: outline_diag code used by 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. [static] int OutlineDiagXYDescription: 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). [static] int OutlineDiagYXDescription: outline_diag_yx code used by 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). [static] int OutlineXYDescription: outline_xy code used by 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). [static] int OutlineYXDescription: outline_yx code used by 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). [static] int StyleArrowBothDescription: style_arrow_both code used by the style method When this style is specified, a two-headed arrow is drawn. [static] int StyleArrowEndDescription: style_arrow_end code used by the style method When this style is specified, an arrow is drawn pointing from the start to the end point. [static] int StyleArrowStartDescription: style_arrow_start code used by the style method When this style is specified, an arrow is drawn pointing from the end to the start point. [static] int StyleLineDescription: style_line code used by the style method When this style is specified, plain line is drawn. [static] int StyleRulerDescription: style_ruler code used by 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. [static] int angle_anyDescription: angle_any code used by the angle_constraint method This method is deprecated. Use method 'AngleAny' instead [const] int angle_constraintDescription: Return the angle constraint attribute. See angle_constraint= for a more detailed description. void angle_constraint=(int flag)Description: Set 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. [static] int angle_diagonalDescription: angle_diagonal code used by the angle_constraint method This method is deprecated. Use method 'AngleDiagonal' instead [static] int angle_globalDescription: angle_global code used by the angle_constraint method. This method is deprecated. Use method 'AngleGlobal' instead [static] int angle_horizontalDescription: angle_horizontal code used by the angle_constraint method This method is deprecated. Use method 'AngleHorizontal' instead [static] int angle_orthoDescription: angle_ortho code used by the angle_constraint method This method is deprecated. Use method 'AngleOrtho' instead [static] int angle_verticalDescription: angle_vertical code used by the angle_constraint method This method is deprecated. Use method 'AngleVertical' instead [const] void assign(const Annotation other)Description: Assign the contents of another object to self This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content. [const] DBox boxDescription: Get the bounding box of the object (not including text)
void createDescription: 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. void destroyDescription: Explicitly destroy the object Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing. [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. [const] Annotation dupDescription: Creates a copy of self [const] string fmtDescription: 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. void fmt=(string format)Description: Set 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. [const] string fmt_xDescription: 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. void fmt_x=(string format)Description: Set 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. [const] string fmt_yDescription: 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. void fmt_y=(string format)Description: Set 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. [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. [static] new Annotation newDescription: Create a new ruler or marker with the default attributes [const] int outlineDescription: Returns the outline style of the annotation object void outline=(int outline)Description: Set 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. [static] int outline_boxDescription: outline_box code used by the outline method This method is deprecated. Use method 'OutlineBox' instead [static] int outline_diagDescription: outline_diag code used by the outline method This method is deprecated. Use method 'OutlineDiag' instead [static] int outline_diag_xyDescription: outline_xy code used by the outline method This method is deprecated. Use method 'OutlineDiagXY' instead [static] int outline_diag_yxDescription: outline_diag_yx code used by the outline method This method is deprecated. Use method 'OutlineDiagYX' instead [static] int outline_xyDescription: outline_xy code used by the outline method This method is deprecated. Use method 'OutlineXY' instead [static] int outline_yxDescription: outline_yx code used by the outline method This method is deprecated. Use method 'OutlineYX' instead [const] DPoint p1Description: Get 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. void p1=(const DPoint point)Description: Set 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. [const] DPoint p2Description: Get 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. void p2=(const DPoint point)Description: Set 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. void snap=(bool flag)Description: Set the 'snap to objects' attribute. If this attribute is set to true, the ruler or marker snaps to other objects when moved. [const] bool snap?Description: Return the 'snap to objects' attribute. [const] int styleDescription: Returns the style of the annotation object void style=(int style)Description: Set 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. [static] int style_arrow_bothDescription: style_arrow_both code used by the style method This method is deprecated. Use method 'StyleArrowBoth' instead [static] int style_arrow_endDescription: style_arrow_end code used by the style method This method is deprecated. Use method 'StyleArrowEnd' instead [static] int style_arrow_startDescription: style_arrow_start code used by the style method This method is deprecated. Use method 'StyleArrowStart' instead [static] int style_lineDescription: style_line code used by the style method This method is deprecated. Use method 'StyleLine' instead [static] int style_rulerDescription: style_ruler code used by the style method This method is deprecated. Use method 'StyleRuler' instead [const] string textDescription: Return the formatted text for the main label. [const] string text_xDescription: Return the formatted text for the x-axis label. [const] string text_yDescription: Return the formatted text for the y-axis label. [const] string to_sDescription: Returns the string representation of the ruler. This method was introduced in version 0.19. [const] Annotation transformed(const DTrans t)Description: Transform the ruler or marker with the given simple transformation
[const] Annotation transformed_cplx(const DCplxTrans t)Description: Transform the ruler or marker with the given complex transformation
[const] Annotation transformed_cplx(const ICplxTrans t)Description: Transform the ruler or marker with the given complex transformation
This method has been introduced in version 0.18. |