Trait gooey::core::figures::Displayable
[−]pub trait Displayable<T> {
type Pixels: Displayable<T>;
type Points: Displayable<T>;
type Scaled: Displayable<T>;
fn to_pixels(&self, scale: &DisplayScale<T>) -> Self::Pixels;
fn to_points(&self, scale: &DisplayScale<T>) -> Self::Points;
fn to_scaled(&self, scale: &DisplayScale<T>) -> Self::Scaled;
}
Expand description
Methods for converting between display scales.
Required Associated Types
type Pixels: Displayable<T>
type Pixels: Displayable<T>
The Pixels
unit type for this implementor.
type Points: Displayable<T>
type Points: Displayable<T>
The Points
unit type for this implementor.
type Scaled: Displayable<T>
type Scaled: Displayable<T>
The Scaled
unit type for this implementor.
Required Methods
fn to_pixels(&self, scale: &DisplayScale<T>) -> Self::Pixels
fn to_pixels(&self, scale: &DisplayScale<T>) -> Self::Pixels
Returns this value after applying scale
, if needed.
fn to_points(&self, scale: &DisplayScale<T>) -> Self::Points
fn to_points(&self, scale: &DisplayScale<T>) -> Self::Points
Returns this value after applying scale
, if needed.
fn to_scaled(&self, scale: &DisplayScale<T>) -> Self::Scaled
fn to_scaled(&self, scale: &DisplayScale<T>) -> Self::Scaled
Returns this value after applying scale
, if needed.