[][src]Struct wlroots::render::Renderer

pub struct Renderer<'output> {
    pub damage: Option<(PixmanRegion, Duration)>,
    pub output: &'output mut Output,
    // some fields omitted
}

The state machine type that allows you to manipulate a screen and its buffer.

When this structure is dropped it automatically calls wlr_renderer_end and swaps the buffers.

Fields

Methods

impl<'output> Renderer<'output>
[src]

Create a texture using this renderer.

Renders the requseted texture.

Renders the requested texture using the provided matrix. A typical texture rendering goes like so:

TODO FIXME Show how the typical rendering goes in Rust.

struct wlr_renderer *renderer;
struct wlr_texture *texture;
float projection[16];
float matrix[16];
wlr_texture_get_matrix(texture, &matrix, &projection, 123, 321);
wlr_render_texture_with_matrix(renderer, texture, &matrix);

This will render the texture at <123, 321>.

Defines a scissor box. Only pixels that lie within the scissor box can be modified by drawing functions.

Providing a None for area disables the scissor box.

Renders a solid quad in the specified color.

Renders a solid ellipse in the specified color.

Renders a solid rectangle in the specified color.

Trait Implementations

impl<'output> Drop for Renderer<'output>
[src]

Executes the destructor for this type. Read more

impl<'output> Debug for Renderer<'output>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'output> !Send for Renderer<'output>

impl<'output> !Sync for Renderer<'output>

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

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

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more