Struct lux::graphics::DrawableTexture [] [src]

pub struct DrawableTexture<'a, D: 'a + HasDisplay + HasPrograms> {
    // some fields omitted
}

A texture that can be drawn to like a regular canvas.

A DrawableTexture can be obtained by calling as_drawable on a Texture object.

Trait Implementations

impl<'a, D> DrawParamMod for DrawableTexture<'a, D> where D: HasDisplay + HasPrograms

fn draw_param_mod(&self) -> &DrawParamModifier

fn draw_param_mod_mut(&mut self) -> &mut DrawParamModifier

fn scissor(&self) -> Option<(u32, u32, u32, u32)>

fn take_scissor(&mut self) -> Option<(u32, u32, u32, u32)>

fn set_scissor(&mut self, s: Option<(u32, u32, u32, u32)>)

fn stencil_state(&self) -> StencilState

fn set_stencil_state(&mut self, stencil_state: StencilState)

impl<'a, D> Colored for DrawableTexture<'a, D> where D: HasDisplay + HasPrograms

fn get_color(&self) -> [Float; 4]

fn color<C: Color>(&mut self, color: C) -> &mut DrawableTexture<'a, D>

fn with_color<F, C: Color>(&mut self, color: C, f: F) where F: FnOnce(&mut Self)

impl<'a, D> Transform for DrawableTexture<'a, D> where D: HasDisplay + HasPrograms

fn current_matrix(&self) -> &[[Float; 4]; 4]

fn current_matrix_mut(&mut self) -> &mut [[Float; 4]; 4]

fn apply_matrix(&mut self, other: [[Float; 4]; 4]) -> &mut Self

fn translate(&mut self, dx: Float, dy: Float) -> &mut Self

fn scale(&mut self, sx: Float, sy: Float) -> &mut Self

fn shear(&mut self, sx: Float, sy: Float) -> &mut Self

fn rotate(&mut self, theta: Float) -> &mut Self

fn rotate_around(&mut self, point: (Float, Float), theta: Float) -> &mut Self

fn with_matrix<F, R>(&mut self, f: F) -> R where F: FnOnce(&mut Self) -> R

fn with_rotation<F, R>(&mut self, rotation: Float, f: F) -> R where F: FnOnce(&mut Self) -> R

fn with_translate<F, R>(&mut self, dx: Float, dy: Float, f: F) -> R where F: FnOnce(&mut Self) -> R

fn with_scale<F, R>(&mut self, scale_x: Float, scale_y: Float, f: F) -> R where F: FnOnce(&mut Self) -> R

fn with_shear<F, R>(&mut self, sx: Float, sy: Float, f: F) -> R where F: FnOnce(&mut Self) -> R

fn with_rotate_around<F, R>(&mut self, point: (Float, Float), theta: Float, f: F) -> R where F: FnOnce(&mut Self) -> R

impl<'a, D> HasDisplay for DrawableTexture<'a, D> where D: HasDisplay + HasPrograms

fn borrow_display(&self) -> &Display

fn clone_display(&self) -> Display

impl<'a, D> HasSurface for DrawableTexture<'a, D> where D: HasDisplay + HasPrograms

type Out = SimpleFrameBuffer<'a>

fn surface(&mut self) -> &mut Self::Out

fn surface_and_texture_shader(&mut self) -> (&mut Self::Out, &Program)

fn surface_and_color_shader(&mut self) -> (&mut Self::Out, &Program)

impl<'a, D> HasDrawCache for DrawableTexture<'a, D> where D: HasPrograms + HasDisplay

fn color_draw_cache(&self) -> &Option<CachedColorDraw>

fn tex_draw_cache(&self) -> &Option<CachedTexDraw>

fn color_draw_cache_mut(&mut self) -> &mut Option<CachedColorDraw>

fn tex_draw_cache_mut(&mut self) -> &mut Option<CachedTexDraw>

impl<'a, D> Fetch<Vec<Idx>> for DrawableTexture<'a, D> where D: HasPrograms + HasDisplay

fn fetch(&self) -> Item<Vec<Idx>>

impl<'a, D> Fetch<Vec<TexVertex>> for DrawableTexture<'a, D> where D: HasPrograms + HasDisplay

fn fetch(&self) -> Item<Vec<TexVertex>>

impl<'a, D> Fetch<Vec<ColorVertex>> for DrawableTexture<'a, D> where D: HasPrograms + HasDisplay

fn fetch(&self) -> Item<Vec<ColorVertex>>

impl<'a, D> Canvas for DrawableTexture<'a, D> where D: HasDisplay + HasPrograms

fn size(&self) -> (Float, Float)

fn width(&self) -> Float

fn height(&self) -> Float

fn clear<C: Color>(&mut self, color: C)

fn with_scissor<F, R>(&mut self, x: u32, y: u32, w: u32, h: u32, f: F) -> R where F: FnOnce(&mut Self) -> R

fn draw_to_stencil<R, S>(&mut self, typ: StencilType, stencil_fn: S) -> R where S: FnOnce(&mut Self) -> R

fn clear_stencil(&mut self, typ: StencilType)

fn rect<'a>(&'a mut self, x: Float, y: Float, w: Float, h: Float) -> Rectangle<'a, Self>

fn square<'a>(&'a mut self, x: Float, y: Float, size: Float) -> Rectangle<'a, Self>

fn ellipse<'a>(&'a mut self, x: Float, y: Float, w: Float, h: Float) -> Ellipse<'a, Self>

fn circle<'a>(&'a mut self, x: Float, y: Float, size: Float) -> Ellipse<'a, Self>

fn draw_point<C: Color>(&mut self, x: Float, y: Float, color: C)

fn draw_points(&mut self, pixels: &[ColorVertex])

fn draw_line(&mut self, _x1: Float, _y1: Float, _x2: Float, _y2: Float, _line_size: Float)

fn draw_lines<I: Iterator<Item=(Float, Float)>>(&mut self, _positions: I, _line_size: Float)

fn draw_arc(&mut self, _pos: (Float, Float), _radius: Float, _angle1: Float, _angle2: Float, _line_size: Float)

fn sprite(&mut self, sprite: &Sprite, x: Float, y: Float) -> ContainedSprite<Self>

impl<'a, D> Drop for DrawableTexture<'a, D> where D: HasDisplay + HasPrograms

fn drop(&mut self)