Constructor
new Fill(rac, colornullable)
#
| source:
style/Fill.js, line 19
Creates a new Fill
instance.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
rac |
Rac
|
Instance to use for drawing and creating other objects |
||
color |
Rac.Color
|
<nullable> |
null |
A |
Members
rac :Rac
#
| source:
style/Fill.js, line 38
Instance of Rac
used for drawing and passed along to any created
object.
Methods
(static) from(rac, something) → {Rac.Fill}
#
| source:
style/Fill.js, line 58
Returns a Fill
derived from something
.
- When
something
is an instance ofFill
, returns that same object. - When
something
is an instance ofColor
, returns a newFill
usingsomething
ascolor
. - When
something
is an instance ofStroke
, returns a newFill
usingstroke.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 |