Struct gemini_engine::elements::geometry::Line
source · pub struct Line {
pub pos0: Vec2D,
pub pos1: Vec2D,
pub fill_char: ColChar,
}
Expand description
The Line
takes two Vec2D
s and returns a line between those vertices when blit to a [View
]
Fields§
§pos0: Vec2D
§pos1: Vec2D
§fill_char: ColChar
Implementations§
Trait Implementations§
source§impl ViewElement for Line
impl ViewElement for Line
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 Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
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