![]() |
tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
|
A list of shapes that rasterizes once. More...
#include <image.h>
Public Attributes | |
| uint32_t | count |
| TinyShape | shapes [TINYIMG_DISPLAY_MAX_SHAPES] |
| uint32_t | points |
| float | point [TINYIMG_DISPLAY_MAX_POINTS *2] |
| float | transform [6] |
| uint32_t | depth |
| float | stack [TINYIMG_DISPLAY_MAX_DEPTH][6] |
| TinyBlendMode | blend |
| uint32_t | culled |
| uint32_t | covered |
A list of shapes that rasterizes once.
The Canvas surface this library exists to provide, without a Canvas. Shapes accumulate with a transform stack and nothing is drawn until tiny_display_render, which is what lets two eliminations run first: a shape outside the target is dropped, and a shape an opaque later one covers entirely is dropped as well. Both are decided from the geometry, so neither costs a pass over pixels.
Larger than a TinyPlan; keep one wherever the caller keeps its image rather than deep in a recursion.
| TinyBlendMode TinyDisplayList::blend |
The mode the next shape is added with.
| uint32_t TinyDisplayList::count |
How many shapes have been added.
| uint32_t TinyDisplayList::covered |
Shapes the last render dropped as covered by an opaque later one.
| uint32_t TinyDisplayList::culled |
Shapes the last render dropped as outside the target.
| uint32_t TinyDisplayList::depth |
How many transforms are saved.
| float TinyDisplayList::point[TINYIMG_DISPLAY_MAX_POINTS *2] |
Polygon vertices, in x, y pairs.
| uint32_t TinyDisplayList::points |
How many vertices have been stored.
| TinyShape TinyDisplayList::shapes[TINYIMG_DISPLAY_MAX_SHAPES] |
The shapes, in the order they were added.
| float TinyDisplayList::stack[TINYIMG_DISPLAY_MAX_DEPTH][6] |
The saved transforms.
| float TinyDisplayList::transform[6] |
The current transform.