[−][src]Trait kas::draw::DrawText
Abstraction over text rendering
Note: the current API is designed to meet only current requirements since changes are expected to support external font shaping libraries.
Required methods
pub fn prepare_fonts(&mut self)
[src]
Load resources needed for the next frame
pub fn text(
&mut self,
pass: Pass,
pos: Vec2,
bounds: Vec2,
offset: Vec2,
text: &TextDisplay,
col: Colour
)
[src]
&mut self,
pass: Pass,
pos: Vec2,
bounds: Vec2,
offset: Vec2,
text: &TextDisplay,
col: Colour
)
Draw text with a colour
pub fn text_col_effects(
&mut self,
pass: Pass,
pos: Vec2,
bounds: Vec2,
offset: Vec2,
text: &TextDisplay,
col: Colour,
effects: &[Effect<()>]
)
[src]
&mut self,
pass: Pass,
pos: Vec2,
bounds: Vec2,
offset: Vec2,
text: &TextDisplay,
col: Colour,
effects: &[Effect<()>]
)
Draw text with a colour and effects
The effects list does not contain colour information, but may contain underlining/strikethrough information. It may be empty.
pub fn text_effects(
&mut self,
pass: Pass,
pos: Vec2,
bounds: Vec2,
offset: Vec2,
text: &TextDisplay,
effects: &[Effect<Colour>]
)
[src]
&mut self,
pass: Pass,
pos: Vec2,
bounds: Vec2,
offset: Vec2,
text: &TextDisplay,
effects: &[Effect<Colour>]
)
Draw text with effects
The effects
list provides both underlining and colour information.
If the effects
list is empty or the first entry has start > 0
, a
default entity will be assumed.