Notation used in Ruby API documentation
Module: lay
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.
Since version 0.29.3, markers can be attached to views in two ways: self-managed or persistent.
Self-managed markers are created with a view argument. When the variable goes out of scope, the and the Marker object is released, the marker vanishes. This was the only concept before 0.29.3:
view = ... # some LayoutView marker = RBA::Marker::new(view)
Persistent markers on the other hand are attached to the view and stay within the view. To create a persistent marker, do not use a view argument to the constructor. Instead add them to the view using LayoutView#add_marker. To remove persistent markers, use LayoutView#clear_markers (removes all) or call _destroy on a specific marker:
view = ... # some LayoutView marker = RBA::Marker::new view.add_marker(marker) ... view.clear_markers
Persistent markers do not need to be held in separate variables to keep them visible. In some applications this may be useful.
new Marker ptr | new | (LayoutView ptr view = nil) | Creates a marker |
[const] | Marker 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] | 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] | unsigned int | color | Gets the color of the marker | |
void | color= | (unsigned int color) | Sets the color of the marker | |
void | dismissable= | (bool flag) | Sets a value indicating whether the marker can be hidden | |
[const] | bool | dismissable? | Gets a value indicating whether the marker can be hidden | |
[const] | int | dither_pattern | Gets the stipple pattern index | |
void | dither_pattern= | (int index) | Sets the stipple pattern index | |
[const] | unsigned int | frame_color | Gets the frame color of the marker | |
void | frame_color= | (unsigned int color) | Sets the frame color of the marker | |
[const] | int | halo | Gets the halo flag | |
void | halo= | (int halo) | Sets the halo flag | |
[const] | bool | has_color? | Returns a value indicating whether the marker has a specific color | |
[const] | bool | has_frame_color? | Returns a value indicating whether the marker has a specific frame color | |
[const] | int | line_style | Get the line style | |
void | line_style= | (int index) | Sets the line style | |
[const] | int | line_width | Gets the line width of the marker | |
void | line_width= | (int width) | Sets the line width of the marker | |
void | reset_color | Resets the color of the marker | ||
void | reset_frame_color | Resets the frame color of the marker | ||
void | set | (const DBox box) | Sets the box the marker is to display | |
void | set | (const DText text) | Sets the text the marker is to display | |
void | set | (const DEdge edge) | Sets the edge the marker is to display | |
void | set | (const DPath path) | Sets the path the marker is to display | |
void | set | (const DPolygon polygon) | Sets the polygon the marker is to display | |
void | set_box | (const DBox box) | Sets the box the marker is to display | |
void | set_edge | (const DEdge edge) | Sets the edge the marker is to display | |
void | set_path | (const DPath path) | Sets the path the marker is to display | |
void | set_polygon | (const DPolygon polygon) | Sets the polygon the marker is to display | |
void | set_text | (const DText text) | Sets the text the marker is to display | |
[const] | int | vertex_size | Gets the vertex size of the marker | |
void | vertex_size= | (int size) | Sets the vertex size of the marker |
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_cast | Signature: [const] Marker 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. |
_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. |
color | Signature: [const] unsigned int color Description: Gets the color of the marker This value is valid only if has_color? is true. Python specific notes: |
color= | Signature: void color= (unsigned int color) Description: Sets 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. 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. |
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. |
dismissable= | Signature: void dismissable= (bool flag) Description: Sets a value indicating whether the marker can be hidden Dismissable markers can be hidden setting "View/Show Markers" to "off". The default setting is "false" meaning the marker can't be hidden. This attribute has been introduced in version 0.25.4. Python specific notes: |
dismissable? | Signature: [const] bool dismissable? Description: Gets a value indicating whether the marker can be hidden See dismissable= for a description of this predicate. Python specific notes: |
dither_pattern | Signature: [const] int dither_pattern Description: Gets the stipple pattern index See dither_pattern= for a description of the stipple pattern index. Python specific notes: |
dither_pattern= | Signature: void dither_pattern= (int index) Description: Sets 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. Python specific notes: |
frame_color | Signature: [const] unsigned int frame_color Description: Gets 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. Python specific notes: |
frame_color= | Signature: void frame_color= (unsigned int color) Description: Sets 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. Python specific notes: |
halo | Signature: [const] int halo Description: Gets the halo flag See halo= for a description of the halo flag. Python specific notes: |
halo= | Signature: void halo= (int halo) Description: Sets 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. Python specific notes: |
has_color? | Signature: [const] bool has_color? Description: Returns a value indicating whether the marker has a specific color |
has_frame_color? | Signature: [const] bool has_frame_color? Description: Returns a value indicating whether the marker has a specific frame color The set method has been added in version 0.20. |
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. |
line_style | Signature: [const] int line_style Description: Get the line style See line_style= for a description of the line style index. This method has been introduced in version 0.25. Python specific notes: |
line_style= | Signature: void line_style= (int index) Description: Sets the line style The line style is given by an index. 0 is solid, 1 is dashed and so forth. This method has been introduced in version 0.25. Python specific notes: |
line_width | Signature: [const] int line_width Description: Gets the line width of the marker See line_width= for a description of the line width. Python specific notes: |
line_width= | Signature: void line_width= (int width) Description: Sets the line width of the marker This is the width of the line drawn for the outline of the marker. Python specific notes: |
new | Signature: [static] new Marker ptr new (LayoutView ptr view = nil) Description: Creates 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. See the class description about the options for attaching markers to a view. The 'view' argument is optional since version 0.29.3. Python specific notes: |
reset_color | Signature: void reset_color Description: Resets the color of the marker See set_color for a description of the color property of the marker. |
reset_frame_color | Signature: void reset_frame_color Description: Resets 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. |
set | (1) Signature: void set (const DBox box) Description: Sets 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. |
(2) Signature: void set (const DText text) Description: Sets 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. | |
(3) Signature: void set (const DEdge edge) Description: Sets 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. | |
(4) Signature: void set (const DPath path) Description: Sets 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. | |
(5) Signature: void set (const DPolygon polygon) Description: Sets 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. | |
set_box | Signature: void set_box (const DBox box) Description: Sets 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. |
set_edge | Signature: void set_edge (const DEdge edge) Description: Sets 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. |
set_path | Signature: void set_path (const DPath path) Description: Sets 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. |
set_polygon | Signature: void set_polygon (const DPolygon polygon) Description: Sets 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. |
set_text | Signature: void set_text (const DText text) Description: Sets 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. |
vertex_size | Signature: [const] int vertex_size Description: Gets the vertex size of the marker See vertex_size= for a description. Python specific notes: |
vertex_size= | Signature: void vertex_size= (int size) Description: Sets the vertex size of the marker This is the size of the rectangles drawn for the vertices object. Python specific notes: |