Expand description

Playdate graphics API

Re-exports§

Modules§

Structs§

Enums§

Traits§

Functions§

  • Clears the entire display, filling it with color.
  • Clears the current clip rect.
  • Clears the entire display, filling it with color.
  • Manually flushes the current frame buffer out to the display. This function is automatically called after each pass through the run loop, so there shouldn’t be any need to call it yourself.
  • Draw an ellipse stroked inside the rect.
  • Draws a line from x1, y1 to x2, y2 with a stroke width of width.
  • Draws a width by height rect at x, y.
  • Fills an ellipse inside the rectangle x, y, width, height.
  • Fills the polygon with vertices at the given coordinates (an array of 2 * num_points ints containing alternating x and y values) using the given color and fill, or winding, rule.
  • Draws a filled width by height rect at x, y.
  • Draws a filled triangle with points at x1, y1, x2, y2, and x3, y3.
  • Returns the raw bits in the display buffer, the last completed frame.
  • Returns the current display frame buffer. Rows are 32-bit aligned, so the row stride is 52 bytes, with the extra 2 bytes per row ignored. Bytes are MSB-ordered; i.e., the pixel in column 0 is the 0x80 bit of the first byte of the row.
  • After updating pixels in the buffer returned by get_frame, you must tell the graphics system which rows were updated.
  • Sets the background color shown when the display is offset or for clearing dirty areas in the sprite system.
  • Sets the current clip rect, using world coordinates that is, the given rectangle will be translated by the current drawing offset.
  • Offsets the origin point for all drawing calls to x, y (can be negative).
  • Sets the end cap style used in the line drawing functions.
  • Sets the current clip rect in screen coordinates.