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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.