Struct epaint::text::text_layout::PointScale
source · struct PointScale {
pub pixels_per_point: f32,
}
Expand description
Represents GUI scale and convenience methods for rounding to pixels.
Fields§
§pixels_per_point: f32
Implementations§
source§impl PointScale
impl PointScale
pub fn new(pixels_per_point: f32) -> Self
pub fn pixels_per_point(&self) -> f32
pub fn round_to_pixel(&self, point: f32) -> f32
pub fn floor_to_pixel(&self, point: f32) -> f32
Trait Implementations§
source§impl Clone for PointScale
impl Clone for PointScale
source§fn clone(&self) -> PointScale
fn clone(&self) -> PointScale
Returns a copy 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 moreimpl Copy for PointScale
Auto Trait Implementations§
impl Freeze for PointScale
impl RefUnwindSafe for PointScale
impl Send for PointScale
impl Sync for PointScale
impl Unpin for PointScale
impl UnwindSafe for PointScale
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)