Struct rich_sdl2_rust::surface::window::WindowSurface
source · pub struct WindowSurface<'window> { /* private fields */ }
Implementations§
source§impl<'window> WindowSurface<'window>
impl<'window> WindowSurface<'window>
sourcepub fn update_window_surface(&self) -> Result<()>
pub fn update_window_surface(&self) -> Result<()>
Applies the surface into the original window.
§Errors
Returns Err
if failed to copy the window surface to the screen.
Trait Implementations§
source§impl Debug for WindowSurface<'_>
impl Debug for WindowSurface<'_>
source§impl Surface for WindowSurface<'_>
impl Surface for WindowSurface<'_>
source§fn as_ptr(&self) -> NonNull<RawSurface>
fn as_ptr(&self) -> NonNull<RawSurface>
Returns the raw non-null pointer.
source§fn blend(self, mode: BlendMode) -> Blended<Self>where
Self: Sized,
fn blend(self, mode: BlendMode) -> Blended<Self>where
Self: Sized,
Changes blend mode of the surface.
source§fn alpha_mod(self, alpha: u8) -> AlphaMod<Self>where
Self: Sized,
fn alpha_mod(self, alpha: u8) -> AlphaMod<Self>where
Self: Sized,
Modifies the alpha of the surface.
source§fn color_mod(self, color: Rgb) -> ColorMod<Self>where
Self: Sized,
fn color_mod(self, color: Rgb) -> ColorMod<Self>where
Self: Sized,
Modifies the color of the surface.
source§fn fill_rect(&self, area: Option<Rect>, color: Pixel)
fn fill_rect(&self, area: Option<Rect>, color: Pixel)
Fills in the
area
with the color
, or whole if area
is None
.source§fn fill_rects(&self, areas: impl IntoIterator<Item = Rect>, color: Pixel)
fn fill_rects(&self, areas: impl IntoIterator<Item = Rect>, color: Pixel)
Fills in the
areas
with the color
.source§fn set_palette(&self, palette: &Palette)
fn set_palette(&self, palette: &Palette)
Overwrites the palette of the surface.
Auto Trait Implementations§
impl<'window> !RefUnwindSafe for WindowSurface<'window>
impl<'window> !Send for WindowSurface<'window>
impl<'window> !Sync for WindowSurface<'window>
impl<'window> Unpin for WindowSurface<'window>
impl<'window> !UnwindSafe for WindowSurface<'window>
Blanket Implementations§
source§impl<T> BmpSaveExt for Twhere
T: Surface,
impl<T> BmpSaveExt for Twhere
T: Surface,
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