[][src]Struct processing::Frame

pub struct Frame { /* fields omitted */ }

Implementation of Surface, targeting the default framebuffer.

The back- and front-buffers are swapped when you call finish.

You must call either finish or set_finish or else the destructor will panic.

Methods

impl Frame[src]

pub fn new(context: Rc<Context>, dimensions: (u32, u32)) -> Frame[src]

Builds a new Frame. Use the draw function on Display instead of this function.

pub fn finish(self) -> Result<(), SwapBuffersError>[src]

Stop drawing, swap the buffers, and consume the Frame.

See the documentation of SwapBuffersError about what is being returned.

pub fn set_finish(&mut self) -> Result<(), SwapBuffersError>[src]

Stop drawing, swap the buffers.

The Frame can now be dropped regularly. Calling finish() or set_finish() again will cause Err(SwapBuffersError::AlreadySwapped) to be returned.

Trait Implementations

impl Surface for Frame[src]

fn clear_color(&mut self, red: f32, green: f32, blue: f32, alpha: f32)[src]

Clears the color attachment of the target.

fn clear_color_srgb(&mut self, red: f32, green: f32, blue: f32, alpha: f32)[src]

Clears the color attachment of the target. The color is in sRGB format.

fn clear_depth(&mut self, value: f32)[src]

Clears the depth attachment of the target.

fn clear_stencil(&mut self, value: i32)[src]

Clears the stencil attachment of the target.

fn clear_color_and_depth(&mut self, color: (f32, f32, f32, f32), depth: f32)[src]

Clears the color and depth attachments of the target.

fn clear_color_srgb_and_depth(
    &mut self,
    color: (f32, f32, f32, f32),
    depth: f32
)
[src]

Clears the color and depth attachments of the target. The color is in sRGB format.

fn clear_color_and_stencil(&mut self, color: (f32, f32, f32, f32), stencil: i32)[src]

Clears the color and stencil attachments of the target.

fn clear_color_srgb_and_stencil(
    &mut self,
    color: (f32, f32, f32, f32),
    stencil: i32
)
[src]

Clears the color and stencil attachments of the target. The color is in sRGB format.

fn clear_depth_and_stencil(&mut self, depth: f32, stencil: i32)[src]

Clears the depth and stencil attachments of the target.

fn clear_all(&mut self, color: (f32, f32, f32, f32), depth: f32, stencil: i32)[src]

Clears the color, depth and stencil attachments of the target.

fn clear_all_srgb(
    &mut self,
    color: (f32, f32, f32, f32),
    depth: f32,
    stencil: i32
)
[src]

Clears the color, depth and stencil attachments of the target. The color is in sRGB format.

fn has_depth_buffer(&self) -> bool[src]

Returns true if the surface has a depth buffer available.

fn has_stencil_buffer(&self) -> bool[src]

Returns true if the surface has a stencil buffer available.

fn blit_whole_color_to<S>(
    &self,
    target: &S,
    target_rect: &BlitTarget,
    filter: MagnifySamplerFilter
) where
    S: Surface
[src]

Copies the entire surface to a target surface. See blit_color.

fn fill<S>(&self, target: &S, filter: MagnifySamplerFilter) where
    S: Surface
[src]

Copies the entire surface to the entire target. See blit_color.

impl Drop for Frame[src]

Auto Trait Implementations

impl !Send for Frame

impl !Sync for Frame

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> Erased for T[src]