Vector

Text and Shape related commands.

Vector commands are for creating and modifying vector shapes programmatically. Whenever we refer to shape here it's one of following options:

rectangle
circle
star
polygon
gingerbread
text

shape-add

CommandValueDescription
shape-addshape:stroke:x:y:w:h:color:strokecolorAdd new object

Example

cmd("shape-add:circle:0:10:10:300:300:ff0000")

Other shape commands

CommandValueDescription
shape-bring-to-frontBring object to front (top of z-axis)
shape-send-to-backSend object to back (bottom of z-axis)
shape-corner-roundnessintSet corner roundness value
shape-deleteRemove object
shape-gradient-fill-color1rrbbggSet start color for gradient fill
shape-gradient-fill-color2rrbbggSet end color for gradient fill
shape-gradient-fill-startxintSet gradient fill start x position
shape-gradient-fill-endxintSet gradient fill end x position
shape-gradient-fill-startyintSet gradient fill start y position
shape-gradient-fill-endyintSet gradient fill end y position
shape-peak-radius1intSet peak radius value 1 (star, gingerbread..)
shape-peak-radius2intSet peak radius value 2 (star, gingerbread..)
shape-peak-roundnessintSet peak roundness value (star, gingerbread..)
shape-peaksintAmount of peaks (star, gingerbread..)
shape-pointsintAmount of points in shape (polygon)
shape-set-fill-colorrrbbggSet fill color of the object
shape-set-outline-colorrrbbggSet outline color of the object
shape-stroke-widthrrbbggSet outline width of the object

Text shape commands

CommandValueDescription
text-addstringCreate new text object with given text
text-align-bottomAlign text to bottom of the text box
text-align-centerAlign text to center of the text box
text-align-leftAlign text to left of the text box
text-align-middleAlign text to middle of the text box
text-align-rightAlign text to right of the text box
text-align-topAlign text to top of the text box
text-setid:textSet text. Text id and value required
text-set-colorrrggbbSet text color
text-shadow-xintSet text shadow x distance
text-shadow-yintSet text shadow y distance
text-shadow-blurintSet text shadow blur
text-shadow-strengthintSet text shadow strength
text-shadow-colorrrggbbSet text shadow color
text-sizeintSet text size
text-toolstringSet text tool and add text