Crate playdate_graphics
source ·Expand description
Playdate graphics API
Re-exports§
pub extern crate color;
pub use bitmap::debug_bitmap;
pub use bitmap::display_buffer_bitmap;
pub use bitmap::copy_frame_buffer_bitmap;
pub use bitmap::set_stencil;
pub use bitmap::set_stencil_tiled;
pub use bitmap::set_draw_mode;
pub use bitmap::push_context;
pub use bitmap::pop_context;
Modules§
- Global Playdate graphics API.
- Playdate text API
- Playdate video API
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
tox2, y2
with a stroke width ofwidth
. - Draws a
width
byheight
rect atx, 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 givencolor
and fill, or winding,rule
. - Draws a filled
width
byheight
rect atx, y
. - Draws a filled triangle with points at
x1, y1
,x2, y2
, andx3, 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.