tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
Loading...
Searching...
No Matches
TinyDisplayList Struct Reference

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

Detailed Description

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.

Member Data Documentation

◆ blend

TinyBlendMode TinyDisplayList::blend

The mode the next shape is added with.

◆ count

uint32_t TinyDisplayList::count

How many shapes have been added.

◆ covered

uint32_t TinyDisplayList::covered

Shapes the last render dropped as covered by an opaque later one.

◆ culled

uint32_t TinyDisplayList::culled

Shapes the last render dropped as outside the target.

◆ depth

uint32_t TinyDisplayList::depth

How many transforms are saved.

◆ point

float TinyDisplayList::point[TINYIMG_DISPLAY_MAX_POINTS *2]

Polygon vertices, in x, y pairs.

◆ points

uint32_t TinyDisplayList::points

How many vertices have been stored.

◆ shapes

TinyShape TinyDisplayList::shapes[TINYIMG_DISPLAY_MAX_SHAPES]

The shapes, in the order they were added.

◆ stack

float TinyDisplayList::stack[TINYIMG_DISPLAY_MAX_DEPTH][6]

The saved transforms.

◆ transform

float TinyDisplayList::transform[6]

The current transform.


The documentation for this struct was generated from the following file: