new ToolType(config)
Parameters:
Name | Type | Description |
---|---|---|
config |
object | tool config {fontSize:20,color: "black"} |
- Implements:
Extends
Methods
-
setFont(font)
-
Sets font
Parameters:
Name Type Description font
string font name
-
getFont()
-
Returns current font
-
startInput(id, x, y)
-
On click
Parameters:
Name Type Description id
any unique id in current moment
x
integer x coordinate
y
integer y coordinate
Returns:
- returns new Input for current tool touch
- Type
- Input
-
moveInput(input, x, y, e)
-
[moveInput description]
Parameters:
Name Type Description input
Input [description]
x
number [description]
y
number [description]
e
HTMLEvent [description]
Returns:
[description]
- Type
- undefined
-
finishInput(input, x, y, e)
-
[finishInput description]
Parameters:
Name Type Description input
Input [description]
x
number [description]
y
number [description]
e
HTMLEvent [description]
Returns:
[description]
- Type
- undefined
-
drawFramePath(Drawing, List)
-
Draw engine
Parameters:
Name Type Description Drawing
object parameters
List
object of points to draw
Returns:
- Type
- undefined
-
distance(x1, y1, x2, y2)
-
Calculate distance between two points
Parameters:
Name Type Description x1
number start x
y1
number start y
x2
number end x
y2
number end y
- Inherited From:
- Implements:
Returns:
- distance
- Type
- number