pub trait Gfx {
Show 13 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,
size: UVec2,
material_ref: &MaterialRef,
);
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,
);
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);
}
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, size: UVec2, material_ref: &MaterialRef, )
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)
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)
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.