pub trait Gfx {
// Required methods
fn set_origin(&mut self, position: Vec2);
fn sprite_atlas_frame(
&mut self,
position: Vec3,
frame: u16,
atlas: &impl FrameLookup,
);
fn sprite_atlas(
&mut self,
position: Vec3,
atlas_rect: URect,
material: &MaterialRef,
);
fn text_draw(
&mut self,
position: Vec3,
text: &str,
font_ref: &FontAndMaterialRef,
);
fn text_glyphs(
&self,
position: Vec2,
text: &str,
font_ref: &FontAndMaterialRef,
) -> Vec<Glyph>;
fn tilemap(
&mut self,
position: Vec3,
tiles: &[u16],
width: u16,
atlas: &FixedAtlas,
);
fn tilemap_params(
&mut self,
position: Vec3,
tiles: &[u16],
width: u16,
atlas: &FixedAtlas,
scale: u8,
);
fn now(&self) -> Millis;
}
Required Methods§
fn set_origin(&mut self, position: Vec2)
fn sprite_atlas_frame( &mut self, position: Vec3, frame: u16, atlas: &impl FrameLookup, )
fn sprite_atlas( &mut self, position: Vec3, atlas_rect: URect, material: &MaterialRef, )
fn text_draw( &mut self, position: Vec3, text: &str, font_ref: &FontAndMaterialRef, )
fn text_glyphs( &self, position: Vec2, text: &str, font_ref: &FontAndMaterialRef, ) -> Vec<Glyph>
fn tilemap( &mut self, position: Vec3, tiles: &[u16], width: u16, atlas: &FixedAtlas, )
fn tilemap_params( &mut self, position: Vec3, tiles: &[u16], width: u16, atlas: &FixedAtlas, scale: u8, )
fn now(&self) -> Millis
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.