new DVLine(args)
A DVisual graph element indicate a line
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Array.<Object> | a array contain arguments below
Properties
|
- Source:
Example
new DVLine({'beginX':100,'beginY':100,'endX':20,'endY':20,'style':'dash'});
Methods
between(x, y) → {boolean}
whether the node in the lines's region
Parameters:
Name | Type | Description |
---|---|---|
x |
double | the x value of test node |
y |
double | the y value of test node |
- Source:
Returns:
result -whether (x,y) is in the line's region
- Type
- boolean
draw(dv)
draw the line on dv's canvas
Parameters:
Name | Type | Description |
---|---|---|
dv |
DVisual | the Dvisual instance you want to draw |
- Source:
getShadow()
get the shadow according to the line's direction
- Source:
Returns:
[0,1]