Class: ToolColorpicker

ToolColorpicker


new ToolColorpicker(config)

Tool for moving viewport

Parameters:
Name Type Description
config object

tool config

Extends

Methods


startInput(id, x, y)

MouseDown/TouchStart

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

drawFramePath(Drawing, List)

Draw engine runs both for drawed and received paths

Parameters:
Name Type Description
Drawing object

parameters

List object

of points to draw

Returns:
Type
undefined

setFillColor(r, g, b, a)

Sets color of fill

Parameters:
Name Type Description
r byte

Red

g byte

Green

b byte

Blue

a byte

Alpha

Inherited From:

getFillColor()

Get color of fill

Inherited From:
Returns:

{r: byte, g: byte, b: byte, a: byte}

Type
object

getFillColorStr()

Get color of fill as rgba string

Inherited From:
Returns:
  • rgba(r,g,b,a)
Type
string

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:
Returns:
  • distance
Type
number