Struct pixels_graphics_lib::prelude::Drawable
source · pub struct Drawable<T>where
T: Clone,{ /* private fields */ }
Expand description
Represents a shape that is made of points that can be drawn either as a outline or solid
Implementations§
source§impl<T> Drawable<T>where
T: Clone,
impl<T> Drawable<T>where
T: Clone,
pub fn with_draw_type(&self, draw_type: DrawType) -> Drawable<T>
source§impl<T> Drawable<T>where
Drawable<T>: CreateDrawable<T>,
T: Shape + Clone,
impl<T> Drawable<T>where
Drawable<T>: CreateDrawable<T>,
T: Shape + Clone,
pub fn with_translation<P>(&self, delta: P) -> Drawable<T>where
P: Into<Coord>,
pub fn with_move<P>(&self, xy: P) -> Drawable<T>where
P: Into<Coord>,
pub fn with_scale(&self, scale: f32) -> Drawable<T>
pub fn with_scale_around<P>(&self, scale: f32, point: P) -> Drawable<T>where
P: Into<Coord>,
pub fn with_rotation(&self, degrees: isize) -> Drawable<T>
pub fn with_rotation_around<P>(&self, degrees: isize, point: P) -> Drawable<T>where
P: Into<Coord>,
Trait Implementations§
source§impl<T> PartialEq<Drawable<T>> for Drawable<T>where
T: PartialEq<T> + Clone,
impl<T> PartialEq<Drawable<T>> for Drawable<T>where
T: PartialEq<T> + Clone,
impl<T> Eq for Drawable<T>where
T: Eq + Clone,
impl<T> StructuralEq for Drawable<T>where
T: Clone,
impl<T> StructuralPartialEq for Drawable<T>where
T: Clone,
Auto Trait Implementations§
impl<T> RefUnwindSafe for Drawable<T>where
T: RefUnwindSafe,
impl<T> Send for Drawable<T>where
T: Send,
impl<T> Sync for Drawable<T>where
T: Sync,
impl<T> Unpin for Drawable<T>where
T: Unpin,
impl<T> UnwindSafe for Drawable<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.