Struct pixels_graphics_lib::prelude::collection::ShapeCollection
source · pub struct ShapeCollection { /* private fields */ }
Implementations§
source§impl ShapeCollection
impl ShapeCollection
pub fn with_draw_type(&self, draw_type: DrawType) -> ShapeCollection
source§impl ShapeCollection
impl ShapeCollection
pub fn with_translation<P>(&self, delta: P) -> ShapeCollection
pub fn with_move<P>(&self, xy: P) -> ShapeCollection
source§impl ShapeCollection
impl ShapeCollection
pub fn with_scale(&self, scale: f32) -> ShapeCollection
source§impl ShapeCollection
impl ShapeCollection
pub fn with_rotation(&self, degrees: isize) -> ShapeCollection
source§impl ShapeCollection
impl ShapeCollection
pub fn with_scale_around<P>(&self, scale: f32, center: P) -> ShapeCollection
source§impl ShapeCollection
impl ShapeCollection
pub fn with_rotation_around<P>( &self, degrees: isize, center: P ) -> ShapeCollection
source§impl ShapeCollection
impl ShapeCollection
pub fn new() -> ShapeCollection
source§impl ShapeCollection
impl ShapeCollection
pub fn iter(&self) -> Iter<'_, Drawable<ShapeBox>>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn remove(&mut self, idx: usize) -> Drawable<ShapeBox>
pub fn bounds(&self) -> &Rect
pub fn left(&self) -> isize
pub fn top(&self) -> isize
pub fn bottom(&self) -> isize
pub fn right(&self) -> isize
pub fn center(&self) -> Coord
Trait Implementations§
source§impl Clone for ShapeCollection
impl Clone for ShapeCollection
source§fn clone(&self) -> ShapeCollection
fn clone(&self) -> ShapeCollection
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 ShapeCollection
impl Debug for ShapeCollection
source§impl InsertDrawable<ShapeBox> for ShapeCollection
impl InsertDrawable<ShapeBox> for ShapeCollection
source§impl<S> InsertShape<S> for ShapeCollectionwhere
S: Shape,
impl<S> InsertShape<S> for ShapeCollectionwhere
S: Shape,
source§impl InsertShapeBox for ShapeCollection
impl InsertShapeBox for ShapeCollection
source§impl Renderable<ShapeCollection> for ShapeCollection
impl Renderable<ShapeCollection> for ShapeCollection
Auto Trait Implementations§
impl RefUnwindSafe for ShapeCollection
impl Send for ShapeCollection
impl Sync for ShapeCollection
impl Unpin for ShapeCollection
impl UnwindSafe for ShapeCollection
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.