pub enum Origin<Unit> {
TopLeft,
Center,
Custom(Point<Unit>),
}
Expand description
The origin of a prepared graphic.
Variants§
TopLeft
The graphic should be drawn so that the top-left of the graphic appears at the rendered location. When rotating the graphic, it will rotate around the top-left.
Center
The grapihc should be drawn so that the center of the graphic appears at the rendered location. When rotating the graphic, it will rotate around the center.
Custom(Point<Unit>)
The graphic should be drawn so that the provided relative location appears at the rendered location. When rotating the graphic, it will rotate around this point.
Trait Implementations§
source§impl<Unit: PartialEq> PartialEq for Origin<Unit>
impl<Unit: PartialEq> PartialEq for Origin<Unit>
impl<Unit: Copy> Copy for Origin<Unit>
impl<Unit: Eq> Eq for Origin<Unit>
impl<Unit> StructuralEq for Origin<Unit>
impl<Unit> StructuralPartialEq for Origin<Unit>
Auto Trait Implementations§
impl<Unit> RefUnwindSafe for Origin<Unit>where
Unit: RefUnwindSafe,
impl<Unit> Send for Origin<Unit>where
Unit: Send,
impl<Unit> Sync for Origin<Unit>where
Unit: Sync,
impl<Unit> Unpin for Origin<Unit>where
Unit: Unpin,
impl<Unit> UnwindSafe for Origin<Unit>where
Unit: UnwindSafe,
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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
.§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
.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Unit> IntoComponents<Unit> for Unitwhere
Unit: Copy,
impl<Unit> IntoComponents<Unit> for Unitwhere
Unit: Copy,
source§fn into_components(self) -> (Unit, Unit)
fn into_components(self) -> (Unit, Unit)
Extracts this type’s 2d vector components.
source§fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
Converts this type to another type using
FromComponents
and
IntoComponents
.