pub struct PixelContainer {
pub pixels: Vec<Pixel>,
}
Expand description
Fields§
§pixels: Vec<Pixel>
Any pixels plotted to the PixelContainer
are stored here
Implementations§
Source§impl PixelContainer
impl PixelContainer
Source§impl PixelContainer
impl PixelContainer
Sourcepub fn shade_with(self, shader: &mut Box<dyn CanShade>) -> Self
pub fn shade_with(self, shader: &mut Box<dyn CanShade>) -> Self
Applies the shader to the PixelContainer
’s active pixels. A “shader” in this case is any object which implements CanShade
Trait Implementations§
Source§impl CanCollide for PixelContainer
impl CanCollide for PixelContainer
Source§fn collides_with_pos(&self, pos: Vec2D) -> bool
fn collides_with_pos(&self, pos: Vec2D) -> bool
Returns
true
if the collider intersects the passed positionSource§impl CanDraw for PixelContainer
impl CanDraw for PixelContainer
Source§impl Canvas for PixelContainer
impl Canvas for PixelContainer
Source§impl Clone for PixelContainer
impl Clone for PixelContainer
Source§fn clone(&self) -> PixelContainer
fn clone(&self) -> PixelContainer
Returns a duplicate 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 PixelContainer
impl Debug for PixelContainer
Source§impl Default for PixelContainer
impl Default for PixelContainer
Source§impl From<&[Pixel]> for PixelContainer
impl From<&[Pixel]> for PixelContainer
Auto Trait Implementations§
impl Freeze for PixelContainer
impl RefUnwindSafe for PixelContainer
impl Send for PixelContainer
impl Sync for PixelContainer
impl Unpin for PixelContainer
impl UnwindSafe for PixelContainer
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