Struct gemini_engine::elements::ascii::Sprite
source · pub struct Sprite {
pub pos: Vec2D,
pub texture: String,
pub modifier: Modifier,
/* private fields */
}
Expand description
A ViewElement
that takes a multi-line string as a parameter, and can be used to put ASCII art, text and other such things on the View
Fields§
§pos: Vec2D
§texture: String
§modifier: Modifier
Implementations§
Trait Implementations§
source§impl ViewElement for Sprite
impl ViewElement for Sprite
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 RefUnwindSafe for Sprite
impl Send for Sprite
impl Sync for Sprite
impl Unpin for Sprite
impl UnwindSafe for Sprite
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