Struct gemini_engine::elements::Rect
source · pub struct Rect {
pub pos: Vec2D,
pub size: Vec2D,
pub fill_char: ColChar,
/* private fields */
}Expand description
The Rect takes a position and size, and returns a rectangle at that position with the given width and size when blit to a View
Fields§
§pos: Vec2D§size: Vec2D§fill_char: ColCharImplementations§
Trait Implementations§
source§impl ViewElement for Rect
impl ViewElement for Rect
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 Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnwindSafe for Rect
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