cheatah
Module

plot

cheatah-plot v0.1.0-alpha — Biome Standard 0.6.3-alpha

Functions

fn Image render(cheatah::figure::Figure &fig) #

Render a figure to RGBA8 pixels at the figure's own size — the readback form (the stream frame, the test surface, the encoder input).

A GPU-enabled build TRIES the default GPU lane first when gpu_available reports one and the environment does not say CHEATAH_PLOT_FORCE_CPU=1; any device failure falls back to raster_cpu with a one-time stderr notice, and further renders stay on the CPU. The two rasterizers share the reduce, the bins and the quantization, so the choice never changes what the figure MEANS — only which silicon fills the pixels.

Parameters
fig

The figure model to draw.

Returns

The rendered image (width/height from the figure, row-major RGBA).

Complexity

O(pixels + data); single-threaded by design.

Allocation

the returned image + the transient draw list, bins, and framebuffer. @gpualloc on the GPU path, the five transient buffers of raster_gpu.

Unit testplot:render
fn void save(cheatah::figure::Figure &fig, const std::string &path) #

Render a figure and write it to path as a PNG — the one-call "give me my plot" form.

Parameters
fig

The figure model to draw.

path

The output file path (.png).

Complexity

O(pixels + data).

Allocation

transient render buffers + the encoded byte stream.

Unit testplot:render