shape
Draw various shapes on the screen.
filledRectangle(x, y, w, h, col) | Draw a filled rectangle. |
---|---|
rectangle(x, y, w, h, col) | Draw a hollow rectangle. |
triangle(x, y, w, h, col) | Draw a hollow triangle. |
filledTriangle(x, y, w, h, col) | Draw a filled triangle. |
ellipses(x, y, width, height, colour) | Draws an ellipses. |
filledEllipses(x, y, width, height, colour) | Draws a filled ellipses. |
- filledRectangle(x, y, w, h, col)Source
Draw a filled rectangle.
Parameters
- x number X coordinate of rectangle.
- y number Y coordinate of rectangle.
- w number Width of rectangle.
- h number Height of rectangle.
- col number | string Colour of rectangle, accepts blit or
colours.
colour.
- rectangle(x, y, w, h, col)Source
Draw a hollow rectangle.
Parameters
- x number X coordinate of rectangle.
- y number Y coordinate of rectangle.
- w number Width of rectangle.
- h number Height of rectangle.
- col number | string Colour of rectangle, accepts blit or
colours.
colour.
- triangle(x, y, w, h, col)Source
Draw a hollow triangle. The X/Y is the top left of the triangle "box", and the W/H is the width and height of it. The bottomleft of the triangle is (x,y+h-1), bottom right is (x+w-1,y+h-1), and the top is (x+w/2,y)
Parameters
- x number X coordinate of the triangle.
- y number Y coordinate of the triangle.
- w number Width of the triangle.
- h number Height of the triangle.
- col number Colour of the triangle.
- filledTriangle(x, y, w, h, col)Source
Draw a filled triangle. This has no gauruntee of working correctly.
Parameters
- x number X coordinate of the triangle.
- y number Y coordinate of the triangle.
- w number Width of the triangle.
- h number Height of the triangle.
- col number Colour of the triangle.
- ellipses(x, y, width, height, colour)Source
Draws an ellipses.
Parameters
- x number The center X of the ellipses.
- y number The center Y of the ellipses.
- width number Width of the ellipses in pixels.
- height number Height of the ellipses in pixels.
- colour number Colour of the ellipses.
- filledEllipses(x, y, width, height, colour)Source
Draws a filled ellipses.
Parameters
- x number The center X of the ellipses.
- y number The center Y of the ellipses.
- width number Width of the ellipses in pixels.
- height number Height of the ellipses in pixels.
- colour number Colour of the ellipses.