Struct sdl2::surface::Surface[src]
pub struct Surface { pub raw: *SDL_Surface, pub owned: bool, }
Fields
raw | |
owned |
Methods
impl Surface
fn new(surface_flags: SurfaceFlag, width: int, height: int, bpp: int, rmask: u32, gmask: u32, bmask: u32, amask: u32) -> Result<Surface, ~str>
fn get_width(&self) -> u16
fn get_height(&self) -> u16
fn get_size(&self) -> (u16, u16)
fn get_rect(&self) -> Rect
fn get_pixel_format(&self) -> PixelFormat
fn lock(&self) -> bool
fn with_lock<R>(&self, f: |pixels: &mut [u8]| -> R) -> R
Locks a surface so that the pixels can be directly accessed safely.