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

  1. x number X coordinate of rectangle.
  2. y number Y coordinate of rectangle.
  3. w number Width of rectangle.
  4. h number Height of rectangle.
  5. col number | string Colour of rectangle, accepts blit or colours. colour.
rectangle(x, y, w, h, col)Source

Draw a hollow rectangle.

Parameters

  1. x number X coordinate of rectangle.
  2. y number Y coordinate of rectangle.
  3. w number Width of rectangle.
  4. h number Height of rectangle.
  5. 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

  1. x number X coordinate of the triangle.
  2. y number Y coordinate of the triangle.
  3. w number Width of the triangle.
  4. h number Height of the triangle.
  5. 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

  1. x number X coordinate of the triangle.
  2. y number Y coordinate of the triangle.
  3. w number Width of the triangle.
  4. h number Height of the triangle.
  5. col number Colour of the triangle.
ellipses(x, y, width, height, colour)Source

Draws an ellipses.

Parameters

  1. x number The center X of the ellipses.
  2. y number The center Y of the ellipses.
  3. width number Width of the ellipses in pixels.
  4. height number Height of the ellipses in pixels.
  5. colour number Colour of the ellipses.
filledEllipses(x, y, width, height, colour)Source

Draws a filled ellipses.

Parameters

  1. x number The center X of the ellipses.
  2. y number The center Y of the ellipses.
  3. width number Width of the ellipses in pixels.
  4. height number Height of the ellipses in pixels.
  5. colour number Colour of the ellipses.