pub struct LayerCtx<'a> { /* private fields */ }Expand description
What a LayerPlugin knows about the chart.
Implementations§
Source§impl<'a> LayerCtx<'a>
impl<'a> LayerCtx<'a>
Sourcepub fn rect(&self) -> RectPx
pub fn rect(&self) -> RectPx
The area it draws in: the pane’s plot, or for a chart-wide plugin the plots of all panes (the axes excluded).
Sourcepub fn font(&self, size: Css) -> FontStyleRef
pub fn font(&self, size: Css) -> FontStyleRef
Font of size.
Sourcepub fn text_width(&self, text: &str, font: FontStyleRef) -> f32
pub fn text_width(&self, text: &str, font: FontStyleRef) -> f32
Width of text.
Sourcepub fn line_height(&self, font: FontStyleRef) -> f32
pub fn line_height(&self, font: FontStyleRef) -> f32
Line height of font.
Sourcepub fn coords(&self) -> Option<&DrawingCtx<'a>>
pub fn coords(&self) -> Option<&DrawingCtx<'a>>
Time/price conversions of the pane; None for chart-wide plugins and
for panes without data.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for LayerCtx<'a>
impl<'a> !Send for LayerCtx<'a>
impl<'a> !Sync for LayerCtx<'a>
impl<'a> !UnwindSafe for LayerCtx<'a>
impl<'a> Forget for LayerCtx<'a>
impl<'a> Freeze for LayerCtx<'a>
impl<'a> Move for LayerCtx<'a>
impl<'a> Unpin for LayerCtx<'a>
impl<'a> UnsafeUnpin for LayerCtx<'a>
Blanket Implementations§
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