[][src]Trait sfml_rust::canvas::canvas_state::Drawable

pub trait Drawable {
    fn get_vertices(&self) -> Vec<(f32, f32, f32)>;
fn get_color(&self) -> (f32, f32, f32, f32);
fn get_ti_coords(&self) -> Vec<(f32, f32)>;
fn get_texture_handle(&self) -> Option<Arc<CanvasTextureHandle>>;
fn get_image_handle(&self) -> Option<Arc<CanvasImageHandle>>; fn collect(&self) -> Vec<RuntimeVertexDef> { ... } }

A drawable object can be passed into a CanvasFrame to be rendered Very generic implementation. (N % 2 == 0) vertices, ditto for texture coords, and rgba color Provides Image and Texture handles for drawing

Required methods

fn get_vertices(&self) -> Vec<(f32, f32, f32)>

fn get_color(&self) -> (f32, f32, f32, f32)

fn get_ti_coords(&self) -> Vec<(f32, f32)>

fn get_texture_handle(&self) -> Option<Arc<CanvasTextureHandle>>

fn get_image_handle(&self) -> Option<Arc<CanvasImageHandle>>

Loading content...

Provided methods

fn collect(&self) -> Vec<RuntimeVertexDef>

Loading content...

Implementors

impl Drawable for CompuSprite[src]

impl Drawable for Poly[src]

impl Drawable for Sprite[src]

Loading content...