pub enum DrawTransform<'a> {
Translate {
dx: f32,
dy: f32,
},
Scale {
scale_x: f32,
scale_y: f32,
pivot: Point,
},
Rotate {
degrees: f32,
pivot: Point,
},
Inset {
left: f32,
top: f32,
right: f32,
bottom: f32,
},
ClipRect(Rect),
ClipPath(&'a Path),
}Expand description
One step of DrawScope::with_transform,
as Compose’s DrawTransform calls. Each step applies inside the steps
before it.
Variants§
Translate
Moves the draws by dx, dy.
Scale
Scales the draws about pivot, which stays where it is.
Fields
Rotate
Turns the draws clockwise about pivot.
Fields
Inset
Shrinks the scope by the four insets: the draws move by left and
top and see the smaller size. Nothing is cut.
Fields
ClipRect(Rect)
Cuts the draws to rect, in scope coordinates.
ClipPath(&'a Path)
Cuts the draws to the fill of a path, in scope coordinates.
Trait Implementations§
Source§impl<'a> Clone for DrawTransform<'a>
impl<'a> Clone for DrawTransform<'a>
Source§fn clone(&self) -> DrawTransform<'a>
fn clone(&self) -> DrawTransform<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for DrawTransform<'a>
Source§impl<'a> Debug for DrawTransform<'a>
impl<'a> Debug for DrawTransform<'a>
Source§impl<'a> PartialEq for DrawTransform<'a>
impl<'a> PartialEq for DrawTransform<'a>
impl<'a> StructuralPartialEq for DrawTransform<'a>
Auto Trait Implementations§
impl<'a> Freeze for DrawTransform<'a>
impl<'a> RefUnwindSafe for DrawTransform<'a>
impl<'a> Send for DrawTransform<'a>
impl<'a> Sync for DrawTransform<'a>
impl<'a> Unpin for DrawTransform<'a>
impl<'a> UnsafeUnpin for DrawTransform<'a>
impl<'a> UnwindSafe for DrawTransform<'a>
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more