pub struct CustomDraw {
pub series: SeriesId,
pub generation: u64,
pub kind: &'static str,
pub points: IdxSpan,
pub x_transform: XTransform,
pub y_transform: YTransform,
pub style: SeriesStyleRef,
pub params: [f32; 8],
pub clip: RectPx,
}Expand description
Native drawing of a custom series: emitted instead of the plugin’s
primitives when the renderer declared its kind
(crate::render::Renderer::native_kinds).
Point i of the series is at x (idx(i) - base) * step + offset, where
idx(i) is its fractional logical index
(crate::chart::ChartDataView::custom_index) and the terms are those of
x_transform; prices map through y_transform like a SeriesDraw.
Fields§
§series: SeriesIdThe series.
generation: u64Data generation of the series’ change log (in point numbers).
kind: &'static strCustomSeries::kind.
points: IdxSpanThe points to draw (the series’ own point numbers): the visible ones and one more on each side.
x_transform: XTransformLogical index to x (SeriesOptions::shift included).
y_transform: YTransformPrice to y.
style: SeriesStyleRefResolved colors and line settings.
params: [f32; 8]Written by CustomSeries::native_params (e.g. a color-scale range).
clip: RectPxClip rectangle (the pane’s plot).