Struct gemini_engine::elements::ascii::Text   
source · #[non_exhaustive]pub struct Text<'a> {
    pub pos: Vec2D,
    pub content: &'a str,
    pub align: TextAlign,
    pub modifier: Modifier,
}Expand description
Displays text at the given position
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pos: Vec2D§content: &'a str§align: TextAlignA raw Modifier, determining the appearance of the Sprite
modifier: ModifierImplementations§
source§impl<'a> Text<'a>
 
impl<'a> Text<'a>
pub fn new(pos: Vec2D, content: &str, modifier: Modifier) -> Text<'_>
pub fn new_with_align( pos: Vec2D, content: &str, align: TextAlign, modifier: Modifier ) -> Text<'_>
sourcepub fn draw(pos: Vec2D, content: &str, modifier: Modifier) -> Vec<Point>
 
pub fn draw(pos: Vec2D, content: &str, modifier: Modifier) -> Vec<Point>
Return a vector of Points to display the given content
pub fn draw_with_align( pos: Vec2D, content: &str, align: TextAlign, modifier: Modifier ) -> Vec<Point>
Trait Implementations§
source§impl ViewElement for Text<'_>
 
impl ViewElement for Text<'_>
source§fn active_pixels(&self) -> Vec<Point>
 
fn active_pixels(&self) -> Vec<Point>
Return a vector of every coordinate where a pixel should be placed and its respective 
ColChar. If your whole object is a solid colour, consider using utils::points_to_pixels() which will add the same ColChar to every point and can then be used as this function’s outputAuto Trait Implementations§
impl<'a> RefUnwindSafe for Text<'a>
impl<'a> Send for Text<'a>
impl<'a> Sync for Text<'a>
impl<'a> Unpin for Text<'a>
impl<'a> UnwindSafe for Text<'a>
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