pub struct Renderer<R: Resources, F: Factory<R>> { /* private fields */ }
Expand description
Text renderer.
Implementations§
source§impl<R: Resources, F: Factory<R>> Renderer<R, F>
impl<R: Resources, F: Factory<R>> Renderer<R, F>
sourcepub fn add(&mut self, text: &str, pos: [i32; 2], color: [f32; 4])
pub fn add(&mut self, text: &str, pos: [i32; 2], color: [f32; 4])
Add some text to the current draw scene relative to the top left corner of the screen using pixel coordinates.
sourcepub fn add_anchored(
&mut self,
text: &str,
pos: [i32; 2],
horizontal: HorizontalAnchor,
vertical: VerticalAnchor,
color: [f32; 4]
)
pub fn add_anchored( &mut self, text: &str, pos: [i32; 2], horizontal: HorizontalAnchor, vertical: VerticalAnchor, color: [f32; 4] )
Add text to the draw scene by anchoring an edge or mid-point to a position defined in screen pixel coordinates.
sourcepub fn add_at(&mut self, text: &str, pos: [f32; 3], color: [f32; 4])
pub fn add_at(&mut self, text: &str, pos: [f32; 3], color: [f32; 4])
Add some text to the draw scene using absolute world coordinates.
sourcepub fn draw<C: CommandBuffer<R>, T: RenderFormat>(
&mut self,
encoder: &mut Encoder<R, C>,
target: &RenderTargetView<R, T>
) -> Result<(), Error>
pub fn draw<C: CommandBuffer<R>, T: RenderFormat>( &mut self, encoder: &mut Encoder<R, C>, target: &RenderTargetView<R, T> ) -> Result<(), Error>
Auto Trait Implementations§
impl<R, F> !RefUnwindSafe for Renderer<R, F>
impl<R, F> Send for Renderer<R, F>where F: Send,
impl<R, F> Sync for Renderer<R, F>where F: Sync,
impl<R, F> Unpin for Renderer<R, F>where F: Unpin,
impl<R, F> !UnwindSafe for Renderer<R, F>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more