API reference - Class LayerPropertiesNotation used in Ruby API documentation Description: The layer properties structure
The layer properties encapsulate the settings relevant for the display and source of a layer. Each attribute is present in two incarnations: local and real. "real" refers to the effective attribute after collecting the attributes from the parents to the leaf property node. In the spirit of this distinction, all read accessors are present in "local" and "real" form. The read accessors take a boolean parameter "real" that must be set to true, if the real value shall be returned. "brightness" is a index that indicates how much to make the color brighter to darker rendering the effective color (eff_frame_color, eff_fill_color). It's value is roughly between -255 and 255. Public constructors
Public methods
Deprecated methods (protected, public, static, non-static and constructors)
Detailed description[const] bool !=(const LayerProperties other)Description: Inequality
[const] bool ==(const LayerProperties other)Description: Equality
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 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. [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] 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. void _manageDescription: 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. void _unmanageDescription: 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. [const] int animation(bool real)Description: Gets the animation state The animation state is an integer either being 0 (static), 1 (scrolling), 2 (blinking) or 3 (inversely blinking) Python specific notes:This method is available as method 'animation_' in Python [const] int animationDescription: Gets the animation state This method is a convenience method for "animation(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'animation'. This is the getter. void animation=(int animation)Description: Sets the animation state See the description of the animation method for details about the animation state Python specific notes:The object exposes a writable attribute 'animation'. This is the setter. void assign(const LayerProperties other)Description: Assigns another object to self [const] int cellviewDescription: Gets the the cellview index This is the index of the actual cellview to use. Basically, this method returns source_cellview in "real" mode. The result may be different, if the cellview is not valid for example. In this case, a negative value is returned. void clear_dither_patternDescription: Clears the dither pattern void clear_fill_colorDescription: Resets the fill color void clear_frame_colorDescription: Resets the frame color void clear_lower_hier_levelDescription: Disables a lower hierarchy level specification See has_lower_hier_level for a description of this property void clear_source_nameDescription: Removes any stream layer name specification from this layer void clear_upper_hier_levelDescription: Disables a upper hierarchy level specification See has_upper_hier_level for a description of this property void createDescription: Ensures the C++ object is created Use of this method is deprecated. Use _create instead void destroyDescription: Explicitly destroys the object Use of this method is deprecated. Use _destroy instead [const] bool destroyed?Description: Returns a value indicating whether the object was already destroyed Use of this method is deprecated. Use _destroyed? instead [const] int dither_pattern(bool real)Description: Gets the dither pattern index
This method may deliver an invalid dither pattern index if it is not set. Python specific notes:This method is available as method 'dither_pattern_' in Python [const] int dither_patternDescription: Gets the dither pattern index This method is a convenience method for "dither_pattern(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'dither_pattern'. This is the getter. void dither_pattern=(int index)Description: Sets the dither pattern index The dither pattern index must be one of the valid indices. Indices 0 to 31 denote built-in pattern, indices above 32 denote one of the custom pattern. Index 0 is always solid filled and 1 is always the hollow filled pattern. Python specific notes:The object exposes a writable attribute 'dither_pattern'. This is the setter. [const] new LayerProperties ptr dupDescription: Creates a copy of self [const] unsigned int eff_dither_pattern(bool real)Description: Gets the effective dither pattern index
The effective dither pattern index is always a valid index, even if no dither pattern is set. [const] unsigned int eff_dither_patternDescription: Gets the effective dither pattern index This method is a convenience method for "eff_dither_pattern(true)" This method has been introduced in version 0.22. [const] unsigned int eff_fill_color(bool real)Description: Gets the effective fill color
The effective fill color is computed from the frame color brightness and the frame color. [const] unsigned int eff_fill_colorDescription: Gets the effective fill color This method is a convenience method for "eff_fill_color(true)" This method has been introduced in version 0.22. [const] unsigned int eff_frame_color(bool real)Description: Gets the effective frame color
The effective frame color is computed from the frame color brightness and the frame color. [const] unsigned int eff_frame_colorDescription: Gets the effective frame color This method is a convenience method for "eff_frame_color(true)" This method has been introduced in version 0.22. [const] int fill_brightness(bool real)Description: Gets the fill brightness value
If the brightness is not set, this method may return an invalid value Python specific notes:This method is available as method 'fill_brightness_' in Python [const] int fill_brightnessDescription: Gets the fill brightness value This method is a convenience method for "fill_brightness(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'fill_brightness'. This is the getter. void fill_brightness=(int brightness)Description: Sets the fill brightness For neutral brightness set this value to 0. For darker colors set it to a negative value (down to -255), for brighter colors to a positive value (up to 255) Python specific notes:The object exposes a writable attribute 'fill_brightness'. This is the setter. [const] unsigned int fill_color(bool real)Description: Gets the fill color
This method may return an invalid color if the color is not set. Python specific notes:This method is available as method 'fill_color_' in Python [const] unsigned int fill_colorDescription: Gets the fill color This method is a convenience method for "fill_color(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'fill_color'. This is the getter. void fill_color=(unsigned int color)Description: Sets the fill color to the given value The color is a 32bit value encoding the blue value in the lower 8 bits, the green value in the next 8 bits and the red value in the 8 bits above that. Python specific notes:The object exposes a writable attribute 'fill_color'. This is the setter. [const] LayerProperties flatDescription: Returns the "flattened" (effective) layer properties entry for this node This method returns a LayerProperties object that is not embedded into a hierarchy. This object represents the effective layer properties for the given node. In particular, all 'local' properties are identical to the 'real' properties. Such an object can be used as a basis for manipulations. This method has been introduced in version 0.22. [const] int frame_brightness(bool real)Description: Gets the frame brightness value
If the brightness is not set, this method may return an invalid value Python specific notes:This method is available as method 'frame_brightness_' in Python [const] int frame_brightnessDescription: Gets the frame brightness value This method is a convenience method for "frame_brightness(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'frame_brightness'. This is the getter. void frame_brightness=(int brightness)Description: Sets the frame brightness For neutral brightness set this value to 0. For darker colors set it to a negative value (down to -255), for brighter colors to a positive value (up to 255) Python specific notes:The object exposes a writable attribute 'frame_brightness'. This is the setter. [const] unsigned int frame_color(bool real)Description: Gets the frame color
This method may return an invalid color if the color is not set. Python specific notes:This method is available as method 'frame_color_' in Python [const] unsigned int frame_colorDescription: Gets the frame color This method is a convenience method for "frame_color(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'frame_color'. This is the getter. void frame_color=(unsigned int color)Description: Sets the frame color to the given value The color is a 32bit value encoding the blue value in the lower 8 bits, the green value in the next 8 bits and the red value in the 8 bits above that. Python specific notes:The object exposes a writable attribute 'frame_color'. This is the setter. [const] bool has_dither_pattern?(bool real)Description: True, if the dither pattern is set [const] bool has_dither_pattern?Description: True, if the dither pattern is set This method is a convenience method for "has_dither_pattern?(true)" This method has been introduced in version 0.22. [const] bool has_fill_color?(bool real)Description: True, if the fill color is set [const] bool has_fill_color?Description: True, if the fill color is set This method is a convenience method for "has_fill_color?(true)" This method has been introduced in version 0.22. [const] bool has_frame_color?(bool real)Description: True, if the frame color is set [const] bool has_frame_color?Description: True, if the frame color is set This method is a convenience method for "has_frame_color?(true)" This method has been introduced in version 0.22. [const] bool has_lower_hier_level?(bool real)Description: True, if a lower hierarchy level is explicitly specified If "real" is true, the effective value is returned. [const] bool has_lower_hier_level?Description: True, if a lower hierarchy level is explicitly specified This method is a convenience method for "has_lower_hier_level?(true)" This method has been introduced in version 0.22. [const] bool has_source_name?(bool real)Description: Tells, if a stream layer name is specified for this layer If "real" is true, the effective value is returned. [const] bool has_source_name?Description: Tells, if a stream layer name is specified for this layer This method is a convenience method for "has_source_name?(true)" This method has been introduced in version 0.22. [const] bool has_upper_hier_level?(bool real)Description: True, if a upper hierarchy level is explicitly specified If "real" is true, the effective value is returned. [const] bool has_upper_hier_level?Description: True, if a upper hierarchy level is explicitly specified This method is a convenience method for "has_upper_hier_level?(true)" This method has been introduced in version 0.22. [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 [const] int layer_indexDescription: Gets the the layer index This is the index of the actual layer used. The source specification given by source_layer, source_datatype, source_name is evaluated and the corresponding layer is looked up in the layout object. If a source_layer_index is specified, this layer index is taken as the layer index to use. [const] int lower_hier_level(bool real)Description: The lower hierarchy level shown This is the hierarchy level at which the drawing starts. This property is only meaningful, if has_lower_hier_level is true. The hierarchy level can be relative in which case, 0 refers to the context cell's level. A mode can be specfied for the hierarchy level which is 0 for absolute, 1 for minimum of specified level and set level and 2 for maximum of specified level and set level. Python specific notes:This method is available as method 'lower_hier_level_' in Python [const] int lower_hier_levelDescription: The lower hierarchy level shown This method is a convenience method for "lower_hier_level(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'lower_hier_level'. This is the getter. void lower_hier_level=(int level)Description: Specifies a lower hierarchy level If this method is called, the lower hierarchy level is enabled. See lower_hier_level for a description of this property. Python specific notes:The object exposes a writable attribute 'lower_hier_level'. This is the setter. [const] int lower_hier_level_mode(bool real)Description: Specifies the mode for the lower hierarchy level. See lower_hier_level for a description of this property. This method has been introduced in version 0.20. [const] int lower_hier_level_modeDescription: Specifies the mode for the lower hierarchy level. This method is a convenience method for "lower_hier_level_mode(true)" This method has been introduced in version 0.22. [const] bool lower_hier_level_relative(bool real)Description: Specifies if the lower hierarchy level is relative. See lower_hier_level for a description of this property. This method has been introduced in version 0.19. [const] bool lower_hier_level_relativeDescription: Specifies if the upper hierarchy level is relative. This method is a convenience method for "lower_hier_level_relative(true)" This method has been introduced in version 0.22. void marked=(bool marked)Description: Sets the marked state Python specific notes:The object exposes a writable attribute 'marked'. This is the setter. [const] bool marked?(bool real)Description: Gets the marked state Python specific notes:This method is available as method 'marked_' in Python [const] bool marked?Description: Gets the marked state This method is a convenience method for "marked?(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'marked'. This is the getter. [const] string nameDescription: Gets the name Python specific notes:The object exposes a readable attribute 'name'. This is the getter. void name=(string name)Description: Sets the name to the given string Python specific notes:The object exposes a writable attribute 'name'. This is the setter. [static] new LayerProperties ptr newDescription: Creates a new object of this class Python specific notes:This method is the default initializer of the object void set_lower_hier_level(int level,bool relative)Description: Specifies the lower hierarchy level and if it is relative to the context cell If this method is called, the lower hierarchy level is enabled. See lower_hier_level for a description of this property. This method has been introduced in version 0.19. void set_lower_hier_level(int level,bool relative,int mode)Description: Specifies the lower hierarchy level, if it is relative to the context cell and the mode If this method is called, the lower hierarchy level is enabled. See lower_hier_level for a description of this property. This method has been introduced in version 0.20. void set_upper_hier_level(int level,bool relative)Description: Specifies the upper hierarchy level and if it is relative to the context cell If this method is called, the upper hierarchy level is enabled. See upper_hier_level for a description of this property. This method has been introduced in version 0.19. void set_upper_hier_level(int level,bool relative,int mode)Description: Specifies the upper hierarchy level, if it is relative to the context cell and the mode If this method is called, the upper hierarchy level is enabled. See upper_hier_level for a description of this property. This method has been introduced in version 0.20. [const] string source(bool real)Description: The source specification
This method delivers the source specification as a string Python specific notes:This method is available as method 'source_' in Python [const] string sourceDescription: The source specification This method is a convenience method for "source(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'source'. This is the getter. void source=(string s)Description: Loads the source specification from a string Sets the source specification to the given string. The source specification may contain the cellview index, the source layer (given by layer/datatype or layer name), transformation, property selector etc. This method throws an exception if the specification is not valid. Python specific notes:The object exposes a writable attribute 'source'. This is the setter. [const] int source_cellview(bool real)Description: Gets the cellview index that this layer refers to If "real" is true, the effective value is returned. Python specific notes:This method is available as method 'source_cellview_' in Python [const] int source_cellviewDescription: Gets the cellview index that this layer refers to This method is a convenience method for "source_cellview(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'source_cellview'. This is the getter. void source_cellview=(int cellview_index)Description: Sets the cellview index that this layer refers to See cellview for a description of the transformations. Python specific notes:The object exposes a writable attribute 'source_cellview'. This is the setter. [const] int source_datatype(bool real)Description: Gets the stream datatype that the shapes are taken from If the datatype is positive, the actual layer is looked up by this stream datatype. If a name or layer index is specified, the stream datatype is not used. If "real" is true, the effective value is returned. Python specific notes:This method is available as method 'source_datatype_' in Python [const] int source_datatypeDescription: Gets the stream datatype that the shapes are taken from This method is a convenience method for "source_datatype(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'source_datatype'. This is the getter. void source_datatype=(int datatype)Description: Sets the stream datatype that the shapes are taken from See datatype for a description of this property Python specific notes:The object exposes a writable attribute 'source_datatype'. This is the setter. [const] int source_layer(bool real)Description: Gets the stream layer that the shapes are taken from If the layer is positive, the actual layer is looked up by this stream layer. If a name or layer index is specified, the stream layer is not used. If "real" is true, the effective value is returned. Python specific notes:This method is available as method 'source_layer_' in Python [const] int source_layerDescription: Gets the stream layer that the shapes are taken from This method is a convenience method for "source_layer(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'source_layer'. This is the getter. void source_layer=(int layer)Description: Sets the stream layer that the shapes are taken from See source_layer for a description of this property Python specific notes:The object exposes a writable attribute 'source_layer'. This is the setter. [const] int source_layer_index(bool real)Description: Gets the layer index that the shapes are taken from If the layer index is positive, the shapes drawn are taken from this layer rather than searched for by layer and datatype. This property is stronger than the layer/datatype or name specification. The similar method layer_index returns the actual layer index used, not the given one. The latter may be negative indicating that layer/datatype or name specifications are used. If "real" is true, the effective value is returned. Python specific notes:This method is available as method 'source_layer_index_' in Python [const] int source_layer_indexDescription: Gets the stream layer that the shapes are taken from This method is a convenience method for "source_layer_index(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'source_layer_index'. This is the getter. void source_layer_index=(int index)Description: Sets the layer index specification that the shapes are taken from See source_layer_index for a description of this property. Python specific notes:The object exposes a writable attribute 'source_layer_index'. This is the setter. [const] string source_name(bool real)Description: Gets the stream name that the shapes are taken from If the name is non-empty, the actual layer is looked up by this stream layer name. If a layer index (see layer_index) is specified, the stream datatype is not used. A name is only meaningful for OASIS files. If "real" is true, the effective value is returned. Python specific notes:This method is available as method 'source_name_' in Python [const] string source_nameDescription: Tells, if a stream layer name is specified for this layer This method is a convenience method for "has_source_name?(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'source_name'. This is the getter. void source_name=(string name)Description: Sets the stream layer name that the shapes are taken from See name for a description of this property Python specific notes:The object exposes a writable attribute 'source_name'. This is the setter. [const] CplxTrans[] trans(bool real)Description: Gets the transformations that the layer is transformed with The transformations returned by this accessor is the one used for displaying this layer. The layout is transformed with each of these transformations before it is drawn. If "real" is true, the effective value is returned. Python specific notes:This method is available as method 'trans_' in Python [const] CplxTrans[] transDescription: Gets the transformations that the layer is transformed with This method is a convenience method for "trans(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'trans'. This is the getter. void trans=(CplxTrans[] trans_vector)Description: Sets the transformations that the layer is transformed with See trans for a description of the transformations. Python specific notes:The object exposes a writable attribute 'trans'. This is the setter. void transparent=(bool transparent)Description: Sets the transparency state Python specific notes:The object exposes a writable attribute 'transparent'. This is the setter. [const] bool transparent?(bool real)Description: Gets the transparency state Python specific notes:This method is available as method 'transparent_' in Python [const] bool transparent?Description: Gets the transparency state This method is a convenience method for "transparent?(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'transparent'. This is the getter. [const] int upper_hier_level(bool real)Description: The upper hierarchy level shown This is the hierarchy level at which the drawing starts. This property is only meaningful, if has_upper_hier_level is true. The hierarchy level can be relative in which case, 0 refers to the context cell's level. A mode can be specfied for the hierarchy level which is 0 for absolute, 1 for minimum of specified level and set level and 2 for maximum of specified level and set level. Python specific notes:This method is available as method 'upper_hier_level_' in Python [const] int upper_hier_levelDescription: The upper hierarchy level shown This method is a convenience method for "upper_hier_level(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'upper_hier_level'. This is the getter. void upper_hier_level=(int level)Description: Specifies a upper hierarchy level If this method is called, the upper hierarchy level is enabled. See upper_hier_level for a description of this property. Python specific notes:The object exposes a writable attribute 'upper_hier_level'. This is the setter. [const] int upper_hier_level_mode(bool real)Description: Specifies the mode for the upper hierarchy level. See upper_hier_level for a description of this property. This method has been introduced in version 0.20. [const] int upper_hier_level_modeDescription: Specifies the mode for the upper hierarchy level. This method is a convenience method for "upper_hier_level_mode(true)" This method has been introduced in version 0.22. [const] bool upper_hier_level_relative(bool real)Description: Specifies if the upper hierarchy level is relative. See upper_hier_level for a description of this property. This method has been introduced in version 0.19. [const] bool upper_hier_level_relativeDescription: Specifies if the upper hierarchy level is relative. This method is a convenience method for "upper_hier_level_relative(true)" This method has been introduced in version 0.22. void valid=(bool valid)Description: Sets the validity state Python specific notes:The object exposes a writable attribute 'valid'. This is the setter. [const] bool valid?(bool real)Description: Gets the validity state Python specific notes:This method is available as method 'valid_' in Python [const] bool valid?Description: Gets the validity state This method is a convenience method for "valid?(true)" This method has been introduced in version 0.23. Python specific notes:The object exposes a readable attribute 'valid'. This is the getter. void visible=(bool visible)Description: Sets the visibility state Python specific notes:The object exposes a writable attribute 'visible'. This is the setter. [const] bool visible?(bool real)Description: Gets the visibility state Python specific notes:This method is available as method 'visible_' in Python [const] bool visible?Description: Gets the visibility state This method is a convenience method for "visible?(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'visible'. This is the getter. [const] int width(bool real)Description: Gets the line width Python specific notes:This method is available as method 'width_' in Python [const] int widthDescription: Gets the line width This method is a convenience method for "width(true)" This method has been introduced in version 0.22. Python specific notes:The object exposes a readable attribute 'width'. This is the getter. void width=(int width)Description: Sets the line width to the given width Python specific notes:The object exposes a writable attribute 'width'. This is the setter. |