pub struct LineAaVertex {
pub x: i32,
pub y: i32,
pub len: i32,
}Expand description
Vertex with distance for AA line rendering.
Port of C++ line_aa_vertex.
Fields§
§x: i32§y: i32§len: i32Implementations§
Source§impl LineAaVertex
impl LineAaVertex
pub fn new(x: i32, y: i32) -> Self
Sourcepub fn calc_distance(&mut self, other: &LineAaVertex) -> bool
pub fn calc_distance(&mut self, other: &LineAaVertex) -> bool
Calculate distance to another vertex and store in self.len.
Returns true if distance > threshold (i.e., not coincident).
This is the equivalent of C++ operator().
Trait Implementations§
Source§impl Clone for LineAaVertex
impl Clone for LineAaVertex
Source§fn clone(&self) -> LineAaVertex
fn clone(&self) -> LineAaVertex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LineAaVertex
impl Debug for LineAaVertex
impl Copy for LineAaVertex
Auto Trait Implementations§
impl Freeze for LineAaVertex
impl RefUnwindSafe for LineAaVertex
impl Send for LineAaVertex
impl Sync for LineAaVertex
impl Unpin for LineAaVertex
impl UnwindSafe for LineAaVertex
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