Trait Gfx

Source
pub trait Gfx {
Show 20 methods // Required methods fn sprite_atlas_frame( &mut self, position: Vec3, frame: u16, atlas: &impl FrameLookup, ); fn sprite_atlas( &mut self, position: Vec3, atlas_rect: URect, material_ref: &MaterialRef, ); fn draw_sprite(&mut self, position: Vec3, material_ref: &MaterialRef); fn draw_sprite_ex( &mut self, position: Vec3, material_ref: &MaterialRef, params: &SpriteParams, ); fn quad(&mut self, position: Vec3, size: UVec2, color: Color); fn draw_with_mask( &mut self, position: Vec3, size: UVec2, color: Color, alpha_masked: &MaterialRef, ); fn nine_slice( &mut self, position: Vec3, size: UVec2, color: Color, nine_slice: &NineSliceAndMaterial, ); fn nine_slice_stretch( &mut self, position: Vec3, size: UVec2, color: Color, nine_slice: &NineSliceAndMaterial, ); fn set_origin(&mut self, position: Vec2); fn set_clear_color(&mut self, color: Color); fn tilemap_params( &mut self, position: Vec3, tiles: &[u16], width: u16, atlas_ref: &FixedAtlas, scale: u8, ); fn text_draw( &mut self, position: Vec3, text: &str, font_ref: &FontAndMaterial, color: &Color, ); fn now(&self) -> Millis; fn physical_aspect_ratio(&self) -> AspectRatio; fn physical_size(&self) -> UVec2; fn set_viewport(&mut self, viewport_strategy: ViewportStrategy); fn viewport(&self) -> &ViewportStrategy; fn set_scale(&mut self, scale_factor: VirtualScale); fn set_virtual_size(&mut self, virtual_size: UVec2); fn quad_ex( &mut self, position: Vec3, size: UVec2, color: Color, params: QuadParams, );
}

Required Methods§

Source

fn sprite_atlas_frame( &mut self, position: Vec3, frame: u16, atlas: &impl FrameLookup, )

Source

fn sprite_atlas( &mut self, position: Vec3, atlas_rect: URect, material_ref: &MaterialRef, )

Source

fn draw_sprite(&mut self, position: Vec3, material_ref: &MaterialRef)

Source

fn draw_sprite_ex( &mut self, position: Vec3, material_ref: &MaterialRef, params: &SpriteParams, )

Source

fn quad(&mut self, position: Vec3, size: UVec2, color: Color)

Source

fn draw_with_mask( &mut self, position: Vec3, size: UVec2, color: Color, alpha_masked: &MaterialRef, )

Source

fn nine_slice( &mut self, position: Vec3, size: UVec2, color: Color, nine_slice: &NineSliceAndMaterial, )

Source

fn nine_slice_stretch( &mut self, position: Vec3, size: UVec2, color: Color, nine_slice: &NineSliceAndMaterial, )

Source

fn set_origin(&mut self, position: Vec2)

Source

fn set_clear_color(&mut self, color: Color)

Source

fn tilemap_params( &mut self, position: Vec3, tiles: &[u16], width: u16, atlas_ref: &FixedAtlas, scale: u8, )

Source

fn text_draw( &mut self, position: Vec3, text: &str, font_ref: &FontAndMaterial, color: &Color, )

Source

fn now(&self) -> Millis

Source

fn physical_aspect_ratio(&self) -> AspectRatio

Source

fn physical_size(&self) -> UVec2

Source

fn set_viewport(&mut self, viewport_strategy: ViewportStrategy)

Source

fn viewport(&self) -> &ViewportStrategy

Source

fn set_scale(&mut self, scale_factor: VirtualScale)

Source

fn set_virtual_size(&mut self, virtual_size: UVec2)

Source

fn quad_ex( &mut self, position: Vec3, size: UVec2, color: Color, params: QuadParams, )

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§