Struct tiny_skia_path::NonZeroRect
source · pub struct NonZeroRect { /* private fields */ }
Expand description
Implementations§
source§impl NonZeroRect
impl NonZeroRect
sourcepub fn from_ltrb(left: f32, top: f32, right: f32, bottom: f32) -> Option<Self>
pub fn from_ltrb(left: f32, top: f32, right: f32, bottom: f32) -> Option<Self>
Creates new NonZeroRect
.
sourcepub fn translate_to(&self, x: f32, y: f32) -> Option<Self>
pub fn translate_to(&self, x: f32, y: f32) -> Option<Self>
Translates the rect to the specified position.
sourcepub fn transform(&self, ts: Transform) -> Option<Self>
pub fn transform(&self, ts: Transform) -> Option<Self>
Transforms the rect using the provided Transform
.
This method is expensive.
sourcepub fn bbox_transform(&self, bbox: NonZeroRect) -> Self
pub fn bbox_transform(&self, bbox: NonZeroRect) -> Self
Applies a bounding box transform.
sourcepub fn to_int_rect(&self) -> IntRect
pub fn to_int_rect(&self) -> IntRect
Converts into IntRect
.
Trait Implementations§
source§impl Clone for NonZeroRect
impl Clone for NonZeroRect
source§fn clone(&self) -> NonZeroRect
fn clone(&self) -> NonZeroRect
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 moresource§impl Debug for NonZeroRect
impl Debug for NonZeroRect
source§impl PartialEq for NonZeroRect
impl PartialEq for NonZeroRect
source§fn eq(&self, other: &NonZeroRect) -> bool
fn eq(&self, other: &NonZeroRect) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for NonZeroRect
impl StructuralPartialEq for NonZeroRect
Auto Trait Implementations§
impl RefUnwindSafe for NonZeroRect
impl Send for NonZeroRect
impl Sync for NonZeroRect
impl Unpin for NonZeroRect
impl UnwindSafe for NonZeroRect
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