pub struct Texture(/* private fields */);Implementations§
Source§impl Texture
impl Texture
pub fn create(options: TextureCreationOptions<'_>) -> Self
pub fn add_action(&mut self, action: TextureAction)
pub fn draw_rect( &mut self, start: impl Into<UVec2>, end: impl Into<UVec2>, color: Color, )
pub fn clear(&mut self, color: Color)
pub fn get_pixel(&self, x: u32, y: u32) -> Color
Sourcepub fn set_pixel<P>(&mut self, draw_pixel: P)
pub fn set_pixel<P>(&mut self, draw_pixel: P)
For better performance, use Self::set_pixels instead with all the pixels you want to set.
pub fn set_pixels<P>(&mut self, pixels: &[P])
pub fn apply_to(&mut self, name: &str)
pub fn flush(&mut self)
Auto Trait Implementations§
impl Freeze for Texture
impl RefUnwindSafe for Texture
impl Send for Texture
impl Sync for Texture
impl Unpin for Texture
impl UnwindSafe for Texture
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