Graphic Functions

For drawing to the canvas we need to create geometry. This functions only request position and size, the color, texture, and other configurations are managed by the State.

  • rect — Draw a rectangle on the canvas from a (x, y) coordinate and a (width, height) size.
  • ellipse — Draw a ellipse on the canvas from a (x, y) coordinate and a (width, height) size.
  • triangle — Draw a triangle on the canvas from three coordinates.
  • triangleStrip — Draw a triangle strip on the canvas from a list of coordinates.
  • line — Draw a line on the canvas from a list of coordinates.