// Create a circle or oval shape
$.shape.oval(
$.w/2, // x position
100, // y position
50, // width size
20, // height size (Optional)
);
// Create a rectangle
$.shape.rectangle(
$.w/2, // x position
$.h/2, // y position
200, // width size
20 // height size
);
$.shape
Controls for Drawing Shapes
Properties
Methods
- $.shape.rectangle(x,y,w,h,)//Draws a rectangle
- $.shape.oval(x,y,w,h,)//Draws an oval
- $.shape.line(xStart,yStart,xEnd,yEnd,)//Draws a line between the 2 pairs of coordinate
- $.shape.multiline(...coords,)//Takes pairs of coords to draw multiple connected lines
- $.shape.polygon(...coords,)//Takes pairs of coords to draw a shape connected between them all
- $.shape.arc(x,y,w,h,startAngle,endAngle,)//Draws an arc with the provided values