pub struct WindowSurfaceRef<'a>(_, _);

Implementations

Updates the change made to the inner Surface to the Window it was created from.

This would effectively be the theoretical equivalent of present from a Canvas.

Same as update_window, but only update the parts included in rects to the Window it was created from.

Gives up this WindowSurfaceRef, allowing to use the window freely again. Before being destroyed, calls update_window one last time.

If you don’t want to update_window one last time, simply Drop this struct. However beware, since the Surface will still be in the state you left it the next time you will call window.surface() again.

Methods from Deref<Target = SurfaceRef>

Locks a surface so that the pixels can be directly accessed safely.

Locks a surface so that the pixels can be directly accessed safely.

Returns the Surface’s pixel buffer if the Surface doesn’t require locking (e.g. it’s a software surface).

Returns the Surface’s pixel buffer if the Surface doesn’t require locking (e.g. it’s a software surface).

Returns true if the Surface needs to be locked before accessing the Surface pixels.

The function will fail if the surface doesn’t have color key enabled.

The function will fail if the blend mode is not supported by SDL.

Sets the clip rectangle for the surface.

If the rectangle is None, clipping will be disabled.

Gets the clip rectangle for the surface.

Returns None if clipping is disabled.

Copies the surface into a new one that is optimized for blitting to a surface of a specified pixel format.

Copies the surface into a new one of a specified pixel format.

Performs surface blitting (surface copying).

Returns the final blit rectangle, if a dst_rect was provided.

Performs low-level surface blitting.

Unless you know what you’re doing, use blit() instead, which will clip the input rectangles. This function could crash if the rectangles aren’t pre-clipped to the surface, and is therefore unsafe.

Performs scaled surface bliting (surface copying).

Returns the final blit rectangle, if a dst_rect was provided.

Performs low-level scaled surface blitting.

Unless you know what you’re doing, use blit_scaled() instead, which will clip the input rectangles. This function could crash if the rectangles aren’t pre-clipped to the surface, and is therefore unsafe.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.