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
Command | Value | Description |
---|---|---|
shape-add | shape:stroke:x:y:w:h:color:strokecolor | Add new object |
Example
cmd("shape-add:circle:0:10:10:300:300:ff0000")
Other shape commands
Command | Value | Description |
---|---|---|
shape-bring-to-front | Bring object to front (top of z-axis) | |
shape-send-to-back | Send object to back (bottom of z-axis) | |
shape-corner-roundness | int | Set corner roundness value |
shape-delete | Remove object | |
shape-gradient-fill-color1 | rrbbgg | Set start color for gradient fill |
shape-gradient-fill-color2 | rrbbgg | Set end color for gradient fill |
shape-gradient-fill-startx | int | Set gradient fill start x position |
shape-gradient-fill-endx | int | Set gradient fill end x position |
shape-gradient-fill-starty | int | Set gradient fill start y position |
shape-gradient-fill-endy | int | Set gradient fill end y position |
shape-peak-radius1 | int | Set peak radius value 1 (star, gingerbread..) |
shape-peak-radius2 | int | Set peak radius value 2 (star, gingerbread..) |
shape-peak-roundness | int | Set peak roundness value (star, gingerbread..) |
shape-peaks | int | Amount of peaks (star, gingerbread..) |
shape-points | int | Amount of points in shape (polygon) |
shape-set-fill-color | rrbbgg | Set fill color of the object |
shape-set-outline-color | rrbbgg | Set outline color of the object |
shape-stroke-width | rrbbgg | Set outline width of the object |
Text shape commands
Command | Value | Description |
---|---|---|
text-add | string | Create new text object with given text |
text-align-bottom | Align text to bottom of the text box | |
text-align-center | Align text to center of the text box | |
text-align-left | Align text to left of the text box | |
text-align-middle | Align text to middle of the text box | |
text-align-right | Align text to right of the text box | |
text-align-top | Align text to top of the text box | |
text-set | id:text | Set text. Text id and value required |
text-set-color | rrggbb | Set text color |
text-shadow-x | int | Set text shadow x distance |
text-shadow-y | int | Set text shadow y distance |
text-shadow-blur | int | Set text shadow blur |
text-shadow-strength | int | Set text shadow strength |
text-shadow-color | rrggbb | Set text shadow color |
text-size | int | Set text size |
text-tool | string | Set text tool and add text |