pub struct ScaledMetrics {
pub pixels_per_point: f32,
pub px_scale_factor: f32,
pub y_offset_in_points: f32,
pub ascent: f32,
pub row_height: f32,
}Expand description
Metrics for a font at a specific screen-space scale.
Fields§
§pixels_per_point: f32The DPI part of the screen-space scale.
px_scale_factor: f32Scale factor, relative to the font’s units per em (so, probably much less than 1).
Translates “unscaled” units to physical (screen) pixels.
y_offset_in_points: f32Vertical offset, in UI points.
ascent: f32This is the distance from the top to the baseline.
Unit: points.
row_height: f32Height of one row of text in points.
Returns a value rounded to emath::GUI_ROUNDING.
Trait Implementations§
Source§impl Clone for ScaledMetrics
impl Clone for ScaledMetrics
Source§fn clone(&self) -> ScaledMetrics
fn clone(&self) -> ScaledMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScaledMetrics
impl Debug for ScaledMetrics
Source§impl Default for ScaledMetrics
impl Default for ScaledMetrics
Source§fn default() -> ScaledMetrics
fn default() -> ScaledMetrics
Returns the “default value” for a type. Read more
Source§impl PartialEq for ScaledMetrics
impl PartialEq for ScaledMetrics
impl Copy for ScaledMetrics
impl StructuralPartialEq for ScaledMetrics
Auto Trait Implementations§
impl Freeze for ScaledMetrics
impl RefUnwindSafe for ScaledMetrics
impl Send for ScaledMetrics
impl Sync for ScaledMetrics
impl Unpin for ScaledMetrics
impl UnwindSafe for ScaledMetrics
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