wlmaker
Loading...
Searching...
No Matches
wlm_graph_state_t Struct Reference
Collaboration diagram for wlm_graph_state_t:

Public Attributes

wlm_graph_sample_tsamples_alloc
wlm_graph_sample_tsample_current
uint32_t icon_size [2]
uint32_t graph_size [2]
uint32_t margin_px
uint32_t pixel_lut [256]
uint32_t pixel_line
uint32_t * row_counts
uint32_t * graph_pixels
uint32_t y_min
uint32_t y_min_prev
wlm_graph_sample_tsample_peak

Detailed Description

Common graph state (managed internally by wlm_graph_app_run).

Member Data Documentation

◆ graph_pixels

uint32_t* wlm_graph_state_t::graph_pixels

Pre-rendered graph buffer (graph_size[0] * graph_size[1] pixels).

◆ graph_size

uint32_t wlm_graph_state_t::graph_size[2]

Graph size [width, height] in pixels (inner area).

◆ icon_size

uint32_t wlm_graph_state_t::icon_size[2]

Current icon size [width, height] (for detecting size changes).

◆ margin_px

uint32_t wlm_graph_state_t::margin_px

Scaled margin for current icon dimensions.

◆ pixel_line

uint32_t wlm_graph_state_t::pixel_line

Pixel color for the line (top of usage).

◆ pixel_lut

uint32_t wlm_graph_state_t::pixel_lut[256]

Lookup table: pixel color for each value (0-255).

◆ row_counts

uint32_t* wlm_graph_state_t::row_counts

Scratch buffer for per-row counts during rendering.

Each value's usage fills a vertical bar from bottom to top. row_counts[y] accumulates how many values have bars extending to row y. This count is then mapped to pixel intensity.

◆ sample_current

wlm_graph_sample_t* wlm_graph_state_t::sample_current

Current sample (newest in circular buffer).

◆ sample_peak

wlm_graph_sample_t* wlm_graph_state_t::sample_peak

Sample with highest peak (defines y_min).

◆ samples_alloc

wlm_graph_sample_t* wlm_graph_state_t::samples_alloc

Allocated sample buffer (graph_size[0] entries).

◆ y_min

uint32_t wlm_graph_state_t::y_min

Minimum y (highest peak) across rendered samples for partial scroll.

◆ y_min_prev

uint32_t wlm_graph_state_t::y_min_prev

Previous y_min value (used for scroll bounds).


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