Trait plotters::style::SizeDesc

source ·
pub trait SizeDesc {
    // Required method
    fn in_pixels<T: HasDimension>(&self, parent: &T) -> i32;
}
Expand description

The trait that describes a size, it may be a relative size which the size is determined by the parent size, e.g., 10% of the parent width

Required Methods§

source

fn in_pixels<T: HasDimension>(&self, parent: &T) -> i32

Convert the size into the number of pixels

  • parent: The reference to the parent container of this size
  • returns: The number of pixels

Implementations on Foreign Types§

source§

impl SizeDesc for f32

source§

fn in_pixels<D: HasDimension>(&self, _parent: &D) -> i32

source§

impl SizeDesc for u32

source§

fn in_pixels<D: HasDimension>(&self, _parent: &D) -> i32

source§

impl SizeDesc for f64

source§

fn in_pixels<D: HasDimension>(&self, _parent: &D) -> i32

source§

impl SizeDesc for i32

source§

fn in_pixels<D: HasDimension>(&self, _parent: &D) -> i32

Implementors§