pub struct GraphicsTexture { /* private fields */ }Expand description
Wrapper around gs_texture_t
Implementations§
Source§impl GraphicsTexture
impl GraphicsTexture
pub fn new(width: u32, height: u32, format: GraphicsColorFormat) -> Self
pub fn height(&self) -> u32
pub fn width(&self) -> u32
pub fn set_image(&mut self, data: &[u8], linesize: u32, invert: bool)
pub fn draw(&self, x: c_int, y: c_int, cx: u32, cy: u32, flip: bool)
pub fn map(&mut self) -> Result<MappedTexture<'_>>
pub fn as_ptr(&self) -> *mut gs_texture_t
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphicsTexture
impl RefUnwindSafe for GraphicsTexture
impl !Send for GraphicsTexture
impl !Sync for GraphicsTexture
impl Unpin for GraphicsTexture
impl UnwindSafe for GraphicsTexture
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