jsgl.fill.SolidFill
is a simple class for styling the interior of elements.
Many JSGL elements use the class to specify their appearance:
jsgl.elements.RectangleElement
),jsgl.elements.CircleElement
),jsgl.elements.EllipseElement
),jsgl.elements.PolygonElement
),jsgl.elements.CurveElement
),jsgl.elements.ShapeElement
).
By default, each of these elements obtain its own fill object on
instantiation, typically defining some very default properties
(color=ā€�whiteā€¯, opacity=1.0
, etc.).
Setters | |
---|---|
setColor(newColor: String) | Sets the new color to be used for filling. |
setOpacity(newOpacity: Number) | Sets the new opacity of the solid fill. |
setEnabled(enabled: Boolean) | Sets whether or not to disable the fill. |
Getters | |
getColor() : String | Gets the current color used for filling. |
getOpacity() : Number | Gets the current opacity of the fill object. |
isEnabled() : Boolean | Determines whether the fill object is currently enabled or not. |
setColor(newColor: String)