Skip to main content

Module ctrl

Module ctrl 

Source
Expand description

Interactive UI controls rendered via AGG’s rendering pipeline.

Port of ctrl/agg_slider_ctrl.h, ctrl/agg_cbox_ctrl.h, ctrl/agg_rbox_ctrl.h.

Controls are vertex sources with multiple colored paths. Use render_ctrl() to render them into a renderer_base, which iterates paths and colors.

In the original C++ library, controls handle mouse interaction directly. In our WASM demos, the JS sidebar handles interaction and passes values as params; these controls render the visual representation on the canvas.

Structs§

CboxCtrl
Checkbox control rendered via AGG.
GammaCtrl
Interactive gamma correction curve control.
RboxCtrl
Radio button box control rendered via AGG.
ScaleCtrl
Two-handle range slider (min/max selector).
SliderCtrl
Horizontal slider control rendered via AGG.
SplineCtrl
Spline control rendered via AGG.

Traits§

Ctrl
Trait for AGG controls that can be rendered as multi-path vertex sources.

Functions§

render_ctrl
Render a control by iterating its paths and rendering each with its color.