![]() |
Chemical Data Processing Library Python API - Version 1.2.3
|
Specifies the fill pattern and fill color of shapes. More...
Inheritance diagram for CDPL.Vis.Brush:Classes | |
| class | Style |
| Defines constants for supported fill pattern styles. More... | |
Public Member Functions | |
| None | __init__ () |
| Constructs a brush with fill pattern style Brush.NO_PATTERN and color Color.BLACK. | |
| None | __init__ (Brush brush) |
| Initializes a copy of the Brush instance brush. More... | |
| None | __init__ (Style style) |
| Constructs a brush with the specified fill pattern style and the color Color.BLACK. More... | |
| None | __init__ (Color color, Style style=CDPL.Vis.Style.SOLID_PATTERN) |
| Constructs a brush with the specified fill pattern style and color. More... | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| Brush | assign (Brush brush) |
Replaces the current state of self with a copy of the state of the Brush instance brush. More... | |
| Color | getColor () |
| Returns the fill pattern color. More... | |
| None | setColor (Color color) |
| Sets the fill pattern color. More... | |
| Style | getStyle () |
| Returns the fill pattern style. More... | |
| None | setStyle (Style style) |
| Sets the fill pattern style. More... | |
| str | __str__ () |
| Returns a string representation of the Brush instance. More... | |
| bool | __eq__ (Brush brush) |
| Equality comparison operator. More... | |
| bool | __ne__ (Brush brush) |
| Inequality comparison operator. More... | |
Properties | |
| objectID = property(getObjectID) | |
| color = property(getColor, setColor) | |
| style = property(getStyle, setStyle) | |
Specifies the fill pattern and fill color of shapes.
A brush has a style and a color attribute. The style defines the look of the fill pattern and the color attribute specifies the color of the specified fill pattern. The style of a default constructed Brush object is Brush.NO_PATTERN, which tells the renderer not to fill drawn shapes.
| None CDPL.Vis.Brush.__init__ | ( | Brush | brush | ) |
Initializes a copy of the Brush instance brush.
| brush | The Brush instance to copy. |
| None CDPL.Vis.Brush.__init__ | ( | Style | style | ) |
Constructs a brush with the specified fill pattern style and the color Color.BLACK.
| style | The style of the fill pattern. |
Constructs a brush with the specified fill pattern style and color.
| color | The fill pattern color. |
| style | The fill pattern style . |
| int CDPL.Vis.Brush.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python Brush instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two Brush instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().
Replaces the current state of self with a copy of the state of the Brush instance brush.
| brush | The Brush instance to copy. |
| Color CDPL.Vis.Brush.getColor | ( | ) |
Returns the fill pattern color.
| None CDPL.Vis.Brush.setColor | ( | Color | color | ) |
Sets the fill pattern color.
| color | The fill pattern color. |
| Style CDPL.Vis.Brush.getStyle | ( | ) |
Returns the fill pattern style.
| None CDPL.Vis.Brush.setStyle | ( | Style | style | ) |
Sets the fill pattern style.
| style | The the fill pattern style. |
| str CDPL.Vis.Brush.__str__ | ( | ) |
Returns a string representation of the Brush instance.
| bool CDPL.Vis.Brush.__eq__ | ( | Brush | brush | ) |
Equality comparison operator.
| brush | The other Brush object to be compared with. |
True if the style and color attributes compare equal, and False otherwise.