[−][src]Struct wlroots::render::Renderer
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
damage: Option<(PixmanRegion, Duration)>
output: &'output mut Output
Methods
impl<'output> Renderer<'output>
[src]
impl<'output> Renderer<'output>
pub fn create_texture_from_pixels(
&mut self,
format: wl_shm_format,
stride: u32,
width: u32,
height: u32,
data: &[u8]
) -> Option<Texture<'static>>
[src]
pub fn create_texture_from_pixels(
&mut self,
format: wl_shm_format,
stride: u32,
width: u32,
height: u32,
data: &[u8]
) -> Option<Texture<'static>>
Create a texture using this renderer.
pub fn clear(&mut self, float: [f32; 4])
[src]
pub fn clear(&mut self, float: [f32; 4])
pub fn render_texture(
&mut self,
texture: &Texture,
projection: [f32; 9],
x: c_int,
y: c_int,
alpha: c_float
) -> bool
[src]
pub fn render_texture(
&mut self,
texture: &Texture,
projection: [f32; 9],
x: c_int,
y: c_int,
alpha: c_float
) -> bool
Renders the requseted texture.
pub fn render_texture_with_matrix(
&mut self,
texture: &Texture,
matrix: [f32; 9]
) -> bool
[src]
pub fn render_texture_with_matrix(
&mut self,
texture: &Texture,
matrix: [f32; 9]
) -> bool
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>.
pub fn render_scissor<T>(&mut self, area: T) where
T: Into<Option<Area>>,
[src]
pub fn render_scissor<T>(&mut self, area: T) where
T: Into<Option<Area>>,
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.
pub fn render_colored_quad(&mut self, color: [f32; 4], matrix: [f32; 9])
[src]
pub fn render_colored_quad(&mut self, color: [f32; 4], matrix: [f32; 9])
Renders a solid quad in the specified color.
pub fn render_colored_ellipse(&mut self, color: [f32; 4], matrix: [f32; 9])
[src]
pub fn render_colored_ellipse(&mut self, color: [f32; 4], matrix: [f32; 9])
Renders a solid ellipse in the specified color.
pub fn render_colored_rect(
&mut self,
area: Area,
color: [f32; 4],
matrix: [f32; 9]
)
[src]
pub fn render_colored_rect(
&mut self,
area: Area,
color: [f32; 4],
matrix: [f32; 9]
)
Renders a solid rectangle in the specified color.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 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