pub struct ChartState<CT: CoordTranslate> { /* private fields */ }Expand description
A chart context state - This is the data that is needed to reconstruct the chart context without actually drawing the chart. This is useful when we want to do realtime rendering and want to incrementally update the chart.
For each frame, instead of updating the entire backend, we are able to keep the keep the figure component like axis, labels untouched and make updates only in the plotting drawing area.
Implementations§
Source§impl<CT: CoordTranslate> ChartState<CT>
impl<CT: CoordTranslate> ChartState<CT>
Sourcepub fn restore<'a, DB: DrawingBackend>(
self,
area: &DrawingArea<DB, Shift>,
) -> ChartContext<'a, DB, CT>
pub fn restore<'a, DB: DrawingBackend>( self, area: &DrawingArea<DB, Shift>, ) -> ChartContext<'a, DB, CT>
Restore the chart context on the given drawing area
area: The given drawing area where we want to restore the chart context- returns The newly created chart context
Trait Implementations§
Source§impl<'a, CT: CoordTranslate + Clone> Clone for ChartState<CT>
impl<'a, CT: CoordTranslate + Clone> Clone for ChartState<CT>
Source§impl<'a, 'b, DB, CT> From<&ChartContext<'a, DB, CT>> for ChartState<CT>
impl<'a, 'b, DB, CT> From<&ChartContext<'a, DB, CT>> for ChartState<CT>
Source§fn from(chart: &ChartContext<'a, DB, CT>) -> ChartState<CT>
fn from(chart: &ChartContext<'a, DB, CT>) -> ChartState<CT>
Converts to this type from the input type.
Source§impl<'a, DB: DrawingBackend, CT: CoordTranslate> From<ChartContext<'a, DB, CT>> for ChartState<CT>
impl<'a, DB: DrawingBackend, CT: CoordTranslate> From<ChartContext<'a, DB, CT>> for ChartState<CT>
Source§fn from(chart: ChartContext<'a, DB, CT>) -> ChartState<CT>
fn from(chart: ChartContext<'a, DB, CT>) -> ChartState<CT>
Converts to this type from the input type.
Auto Trait Implementations§
impl<CT> Freeze for ChartState<CT>where
CT: Freeze,
impl<CT> RefUnwindSafe for ChartState<CT>where
CT: RefUnwindSafe,
impl<CT> Send for ChartState<CT>where
CT: Send,
impl<CT> Sync for ChartState<CT>where
CT: Sync,
impl<CT> Unpin for ChartState<CT>where
CT: Unpin,
impl<CT> UnwindSafe for ChartState<CT>where
CT: UnwindSafe,
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
Source§fn convert_into(self) -> U
fn convert_into(self) -> U
Convert into T with values clamped to the color defined bounds Read more
Source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
Source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined range,
otherwise an
OutOfBounds error is returned which contains the unclamped color. Read more