Class Annotation (version 0.18)

Description: This class implements an "annotation object"

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.

Class overview

Index

Method Overview

[static] Annotation newCreate a new ruler or marker with the default attributes
[static] int style_rulerstyle_ruler code used by the style method
[static] int style_arrow_endstyle_arrow_end code used by the style method
[static] int style_arrow_startstyle_arrow_start code used by the style method
[static] int style_arrow_bothstyle_arrow_both code used by the style method
[static] int style_linestyle_line code used by the style method
[static] int outline_diagoutline_diag code used by the outline method
[static] int outline_xyoutline_xy code used by the outline method
[static] int outline_diag_xyoutline_diag_xy code used by the outline method
[static] int outline_yx outline_yx code used by the outline method
[static] int outline_diag_yx outline_diag_yx code used by the outline method
[static] int outline_boxoutline_box code used by the outline method
[static] int angle_anyangle_any code used by the angle_constraint method
[static] int angle_diagonalangle_diagonal code used by the angle_constraint method
[static] int angle_orthoangle_ortho code used by the angle_constraint method
[static] int angle_horizontalangle_horizontal code used by the angle_constraint method
[static] int angle_verticalangle_vertical code used by the angle_constraint method
[static] int angle_globalangle_global code used by the angle_constraint method.
[const] const ref DPoint p1Get the first point of the ruler or marker
[const] const ref DPoint p2Get the second point of the ruler or marker
p1=( DPoint point )Set the first point of the ruler or marker
p2=( DPoint point )Set the second point of the ruler or marker
[const] Annotation transformed( DTrans t )Transform the ruler or marker with the given simple transformation
[const] Annotation transformed_cplx( DCplxTrans t )Transform the ruler or marker with the given complex transformation
[const] Annotation transformed_cplx( ICplxTrans t )Transform the ruler or marker with the given complex transformation
fmt=( string format )Set the format used for the label
[const] string fmtReturns the format used for the label
fmt_x=( string format )Set the format used for the x-axis label
[const] string fmt_xReturns the format used for the x-axis label
fmt_y=( string format )Set the format used for the y-axis label
[const] string fmt_yReturns the format used for the y-axis label
style=( int style )Set the style used for drawing the annotation object
[const] int styleReturns the style of the annotation object
outline=( int outline )Set the outline style used for drawing the annotation object
[const] int outlineReturns the outline style of the annotation object
snap=( bool flag )Set the 'snap to objects' attribute.
[const] bool snap?Return the 'snap to objects' attribute.
angle_constraint=( int flag )Set the angle constraint attribute.
[const] int angle_constraintReturn the angle constraint attribute.
[const] string text_xReturn the formatted text for the x-axis label.
[const] string text_yReturn the formatted text for the y-axis label.
[const] string textReturn the formatted text for the main label.
[const] bool ==( Annotation )Equality operator
[const] bool !=( Annotation )Inequality operator
assign( Annotation other )Assign the contents of another object to self
[const] Annotation dupCreates a copy of self.
destroyExplicitly destroy the object
[const] bool destroyedTell, if the object was destroyed

[const] bool !=( Annotation )

Description: Inequality operator

[const] bool ==( Annotation )

Description: Equality operator

[static] int angle_any

Description: angle_any code used by the angle_constraint method

[const] int angle_constraint

Description: Return the angle constraint attribute.

See angle_constraint= for a more detailed description.

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_diagonal

Description: angle_diagonal code used by the angle_constraint method

[static] int angle_global

Description: 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 angle_horizontal

Description: angle_horizontal code used by the angle_constraint method

[static] int angle_ortho

Description: angle_ortho code used by the angle_constraint method

[static] int angle_vertical

Description: angle_vertical code used by the angle_constraint method

assign( 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.

destroy

Description: 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: Tell, if the object was 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 dup

Description: Creates a copy of self.

[const] string fmt

Description: Returns the format used for the label

returns:The format string

fmt=( string format )

Description: Set the format used for the label

format:The format string

[const] string fmt_x

Description: Returns the format used for the x-axis label

returns:The format string

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:The format string

[const] string fmt_y

Description: Returns the format used for the y-axis label

returns:The format string

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:The format string

[static] Annotation new

Description: Create a new ruler or marker with the default attributes

[const] int outline

Description: Returns the outline style of the annotation object

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_box

Description: outline_box code used by the outline method

[static] int outline_diag

Description: outline_diag code used by the outline method

[static] int outline_diag_xy

Description: outline_diag_xy code used by the outline method

[static] int outline_diag_yx

Description: outline_diag_yx code used by the outline method

[static] int outline_xy

Description: outline_xy code used by the outline method

[static] int outline_yx

Description: outline_yx code used by the outline method

[const] const ref DPoint p1

Description: 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.

returns:The first point

p1=( 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] const ref DPoint p2

Description: 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.

returns:The second point

p2=( 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.

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 style

Description: Returns the style of the annotation object

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_both

Description: style_arrow_both code used by the style method

[static] int style_arrow_end

Description: style_arrow_end code used by the style method

[static] int style_arrow_start

Description: style_arrow_start code used by the style method

[static] int style_line

Description: style_line code used by the style method

[static] int style_ruler

Description: style_ruler code used by the style method

[const] string text

Description: Return the formatted text for the main label.

[const] string text_x

Description: Return the formatted text for the x-axis label.

[const] string text_y

Description: Return the formatted text for the y-axis label.

[const] Annotation transformed( DTrans t )

Description: Transform the ruler or marker with the given simple transformation

t:The transformation to apply
returns:The transformed object

[const] Annotation transformed_cplx( DCplxTrans t )

Description: Transform the ruler or marker with the given complex transformation

t:The magnifying transformation to apply
returns:The transformed object

[const] Annotation transformed_cplx( ICplxTrans t )

Description: Transform the ruler or marker with the given complex transformation

This method has been introduced in version 0.18.

t:The magnifying transformation to apply
returns:The transformed object (in this case an integer coordinate object)