API reference - Class Marker

Notation used in Ruby API documentation

Description: The floating-point coordinate marker object

The marker is a visual object that "marks" (highlights) a certain area of the layout, given by a database object. This object accepts database objects with floating-point coordinates in micron values.

Public constructors

new Markernew(LayoutView ptr view)The constructor for a marker

Public methods

[const]unsigned intcolorGet the color of the marker
voidcolor=(unsigned int color)Set the color of the marker
voidcreateEnsures the C++ object is created
voiddestroyExplicitly destroy the object
[const]booldestroyed?Returns a value indicating whether the object was already destroyed
[const]intdither_patternGet the stipple pattern index
voiddither_pattern=(int index)Set the stipple pattern index
[const]unsigned intframe_colorGet the frame color of the marker
voidframe_color=(unsigned int color)Set the frame color of the marker
[const]inthaloGet the halo flag
voidhalo=(int halo)Set the halo flag
[const]boolhas_color?True, if the marker has a specific color
[const]boolhas_frame_color?True, if the marker has a specific frame color
[const]boolis_const_object?Returns a value indicating whether the reference is a const reference
[const]intline_widthGet the line width of the marker
voidline_width=(int width)Set the line width of the marker
voidreset_colorReset the color of the marker
voidreset_frame_colorReset the frame color of the marker
voidset(const DBox box)Set the box the marker is to display
voidset(const DText text)Set the text the marker is to display
voidset(const DEdge edge)Set the edge the marker is to display
voidset(const DPath path)Set the path the marker is to display
voidset(const DPolygon polygon)Set the polygon the marker is to display
voidset_box(const DBox box)Set the box the marker is to display
voidset_edge(const DEdge edge)Set the edge the marker is to display
voidset_path(const DPath path)Set the path the marker is to display
voidset_polygon(const DPolygon polygon)Set the polygon the marker is to display
voidset_text(const DText text)Set the text the marker is to display
[const]intvertex_sizeGet the vertex size of the marker
voidvertex_size=(int size)Set the vertex size of the marker

Detailed description

[const] unsigned int color

Description: Get the color of the marker

This value is valid only if has_color? is true.

void color=(unsigned int color)

Description: Set the color of the marker

The color is a 32bit unsigned integer encoding the RGB values in the lower 3 bytes (blue in the lowest significant byte). The color can be reset with reset_color, in which case, the default foreground color is used.

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.

void 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: 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] int dither_pattern

Description: Get the stipple pattern index

See dither_pattern= for a description of the stipple pattern index.

void dither_pattern=(int index)

Description: Set the stipple pattern index

A value of -1 or less than zero indicates that the marker is not filled. Otherwise, the value indicates which pattern to use for filling the marker.

[const] unsigned int frame_color

Description: Get the frame color of the marker

This value is valid only if has_frame_color? is true.The set method has been added in version 0.20.

void frame_color=(unsigned int color)

Description: Set the frame color of the marker

The color is a 32bit unsigned integer encoding the RGB values in the lower 3 bytes (blue in the lowest significant byte). The color can be reset with reset_frame_color, in which case the fill color is used. The set method has been added in version 0.20.

[const] int halo

Description: Get the halo flag

See halo= for a description of the halo flag.

void halo=(int halo)

Description: Set the halo flag

The halo flag is either -1 (for taking the default), 0 to disable the halo or 1 to enable it. If the halo is enabled, a pixel border with the background color is drawn around the marker, the vertices and texts.

[const] bool has_color?

Description: True, if the marker has a specific color

[const] bool has_frame_color?

Description: True, if the marker has a specific frame color

The set method has been added in version 0.20.

[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.

[const] int line_width

Description: Get the line width of the marker

See line_width= for a description of the line width.

void line_width=(int width)

Description: Set the line width of the marker

This is the width of the line drawn for the outline of the marker.

[static] new Marker new(LayoutView ptr view)

Description: The constructor for a marker

A marker is always associated with a view, in which it is shown. The view this marker is associated with must be passed to the constructor.

void reset_color

Description: Reset the color of the marker

See set_color for a description of the color property of the marker.

void reset_frame_color

Description: Reset the frame color of the marker

See set_frame_color for a description of the frame color property of the marker.The set method has been added in version 0.20.

void set(const DBox box)

Description: Set the box the marker is to display

Makes the marker show a box. The box must be given in micron units. If the box is empty, no marker is drawn. The set method has been added in version 0.20.

void set(const DText text)

Description: Set the text the marker is to display

Makes the marker show a text. The text must be given in micron units. The set method has been added in version 0.20.

void set(const DEdge edge)

Description: Set the edge the marker is to display

Makes the marker show a edge. The edge must be given in micron units. The set method has been added in version 0.20.

void set(const DPath path)

Description: Set the path the marker is to display

Makes the marker show a path. The path must be given in micron units. The set method has been added in version 0.20.

void set(const DPolygon polygon)

Description: Set the polygon the marker is to display

Makes the marker show a polygon. The polygon must be given in micron units. The set method has been added in version 0.20.

void set_box(const DBox box)

Description: Set the box the marker is to display

Makes the marker show a box. The box must be given in micron units. If the box is empty, no marker is drawn. The set method has been added in version 0.20.

void set_edge(const DEdge edge)

Description: Set the edge the marker is to display

Makes the marker show a edge. The edge must be given in micron units. The set method has been added in version 0.20.

void set_path(const DPath path)

Description: Set the path the marker is to display

Makes the marker show a path. The path must be given in micron units. The set method has been added in version 0.20.

void set_polygon(const DPolygon polygon)

Description: Set the polygon the marker is to display

Makes the marker show a polygon. The polygon must be given in micron units. The set method has been added in version 0.20.

void set_text(const DText text)

Description: Set the text the marker is to display

Makes the marker show a text. The text must be given in micron units. The set method has been added in version 0.20.

[const] int vertex_size

Description: Get the vertex size of the marker

See vertex_size= for a description.

void vertex_size=(int size)

Description: Set the vertex size of the marker

This is the size of the rectangles drawn for the vertices object.