Constructor
new Fill(rac, colornullable)
Creates a new Fill instance.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
rac |
Rac
|
Instance to use for drawing and creating other objects |
|
color |
Rac.Color
|
<nullable> |
A |
Members
rac :Rac
Instance of Rac used for drawing and passed along to any created
object.
Methods
(static) from(rac, something) → {Rac.Fill}
Returns a Fill derived from something.
- When
somethingis an instance ofFill, returns that same object. - When
somethingis an instance ofColor, returns a newFillusingsomethingascolor. - When
somethingis an instance ofStroke, returns a newFillusingstroke.color. - Otherwise an error is thrown.
Parameters:
| Name | Type | Description |
|---|---|---|
rac |
Rac
|
Instance to pass along to newly created objects |
something |
Rac.Fill
|
Rac.Color
|
Rac.Stroke
|
An object to
derive a |
appendStroke(someStroke) → {Rac.StyleContainer}
Returns a new StyleContainer containing this and the Stroke
derived from someStroke.
- See:
Parameters:
| Name | Type | Description |
|---|---|---|
someStroke |
Rac.Stroke
|
Rac.Color
|
Rac.Fill
|
An object to derive
a |
appendStyle(style) → {Rac.StyleContainer|Rac.Fill}
Returns a new StyleContainer containing this and style. When
style is null, returns this instead.
Parameters:
| Name | Type | Description |
|---|---|---|
style |
Rac.Stroke
|
Rac.Fill
|
Rac.StyleContainer
|
A style object
to contain along |
container() → {Rac.StyleContainer}
Returns a new StyleContainer containing only this.