pub struct BloodCanvas {
pub creator: Arc<AtomicRefCell<dyn TextureCreator + Send + Sync + 'static>>,
pub blocks: HashMap<IVec2, CanvasBlock>,
}Fields§
§creator: Arc<AtomicRefCell<dyn TextureCreator + Send + Sync + 'static>>§blocks: HashMap<IVec2, CanvasBlock>Implementations§
Source§impl BloodCanvas
impl BloodCanvas
pub fn new( creator: Arc<AtomicRefCell<dyn TextureCreator + Send + Sync + 'static>>, ) -> Self
pub fn get_pixel(&mut self, position: Vec2) -> Color
pub fn set_pixel(&mut self, position: Vec2, color: Color)
pub fn circle_at_internal( &mut self, position: Vec2, radius: i32, pixel_prob: f32, color: fn() -> Color, )
pub fn blit_at_sized( &mut self, texture: TextureHandle, position: Vec2, source_rect: Option<IRect>, tint: Color, dest_size: Vec2, )
pub fn blit_at( &mut self, texture: TextureHandle, position: Vec2, source_rect: Option<IRect>, tint: Color, flip_x: bool, flip_y: bool, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BloodCanvas
impl !RefUnwindSafe for BloodCanvas
impl Send for BloodCanvas
impl Sync for BloodCanvas
impl Unpin for BloodCanvas
impl !UnwindSafe for BloodCanvas
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
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more