new KonvaRectangle()
Methods
-
delete()
-
Delete current Markup object
-
enableMouseEditing(value)
-
Set Mouse editing feature
Parameters:
Name Type Description value
true / false
-
getColor()
-
Get color of the Markup instance
-
getHeigth()
-
Get height of the Rectangle. Default value is 200
-
getLineWidth()
-
Get line width of the Rectangle. Defailt value is 4
-
getPosition()
-
Get position of the Rectangle
-
getRotation()
-
Get rotation of the Markup object
-
getWidth()
-
Get width of the Rectangle. Default value is 200
-
getZIndex()
-
Get Z-Index of the Markup object
-
id()
-
Get an internal identificator of the object. Not unique
-
ref()
-
Link to Library object
-
setColor(hex)
-
Set color of the Markup instance
Parameters:
Name Type Description hex
color in #hex format. Default:
#ff0000
-
setHeight(h)
-
Set height of the Rectangle
Parameters:
Name Type Description h
value of height. Default value is 200
-
setLineWidth(size)
-
Set line width of the Rectangle
Parameters:
Name Type Description size
value of width. Defailt value is 4
-
setPosition(x, y)
-
Set position of the Rectangle
Parameters:
Name Type Description x
value of X coordinate
y
value of Y coordinate
-
setRotation(degrees)
-
Set rotation of the Markup object
Parameters:
Name Type Description degrees
number of degress to rotate
-
setWidth(w)
-
Set width of the Rectangle
Parameters:
Name Type Description w
value of width. Default value is 200
-
setZIndex(zIndex)
-
Set Z-Index of the Markup object
Parameters:
Name Type Description zIndex
integer value of Z-Index
-
type()
-
Get type of the Markup object