A bitmap is a plain, backend-agnostic pixel buffer descriptor - see pix_bitmap_t's own doc.
More...
|
| pix_color_t | pix_bitmap_get_pixel (const pix_bitmap_t *bitmap, pix_point_t point) |
| | Read a single pixel's color. More...
|
| |
| void | pix_bitmap_set_pixel (pix_bitmap_t *bitmap, pix_point_t point, pix_color_t color) |
| | Write a single pixel's color. More...
|
| |
| void | pix_bitmap_fill_rect (pix_bitmap_t *bitmap, pix_point_t origin, pix_size_t size, pix_color_t color) |
| | Fill a rectangle with a single color. More...
|
| |
| void | pix_bitmap_draw_line (pix_bitmap_t *bitmap, pix_point_t a, pix_point_t b, pix_color_t color) |
| | Draw a straight line between two points. More...
|
| |
| void | pix_bitmap_set_op (pix_bitmap_t *bitmap, pix_op_t op) |
| | Change a bitmap's compositing mode. More...
|
| |
A bitmap is a plain, backend-agnostic pixel buffer descriptor - see pix_bitmap_t's own doc.
◆ pix_bitmap_draw_line()
Draw a straight line between two points.
- Parameters
-
| bitmap | The bitmap to write to. |
| a | One endpoint. |
| b | The other endpoint. |
| color | The color to draw with - see pix_bitmap_set_pixel()'s own doc on compositing. |
Silently clips to bitmap's own bounds - a no-op if bitmap is invalid.
◆ pix_bitmap_fill_rect()
Fill a rectangle with a single color.
- Parameters
-
| bitmap | The bitmap to write to. |
| origin | The rectangle's top-left corner. |
| size | The rectangle's dimensions. |
| color | The color to fill with - see pix_bitmap_set_pixel()'s own doc on compositing. |
Silently clips to bitmap's own bounds - a no-op if bitmap is invalid.
◆ pix_bitmap_get_pixel()
Read a single pixel's color.
- Parameters
-
| bitmap | The bitmap to read from. |
| point | The pixel coordinates to read. |
- Returns
- The pixel's color, or
PIX_COLOR_NONE if bitmap is invalid, point is out of bounds, or bitmap's format isn't supported.
◆ pix_bitmap_set_op()
Change a bitmap's compositing mode.
- Parameters
-
| bitmap | The bitmap to change. A no-op if invalid. |
| op | The new mode - see pix_bitmap_t::op. |
◆ pix_bitmap_set_pixel()
Write a single pixel's color.
- Parameters
-
| bitmap | The bitmap to write to. |
| point | The pixel coordinates to write. |
| color | The color to write - composited according to bitmap's own op (see pix_bitmap_t::op), which defaults to PIX_BLEND; a format with no alpha channel of its own treats its existing pixel as fully opaque for that blend. |
A no-op if bitmap is invalid, point is out of bounds, or bitmap's format isn't supported.