pub struct Arrow {
pub angle: f64,
pub length: f64,
pub ends: ArrowEnds,
pub kind: ArrowType,
pub position: f64,
pub length_per_linewidth: f64,
}Expand description
Describes an arrowhead to draw at the end(s) of a line-like geom,
following R grid’s arrow(). position and length_per_linewidth are
ggplot-rs extensions, not part of grid’s API.
Fields§
§angle: f64Half-angle of the arrowhead, in degrees. The full opening angle
(between the two wings) is 2 * angle.
length: f64Wing length in pixels.
ends: ArrowEndsWhich end(s) of the path get a head. Default ArrowEnds::Last.
kind: ArrowTypeOpen (stroked wings) or closed (filled triangle). Default
ArrowType::Open.
position: f64Where along the path’s arc length the head sits, as a fraction in
[0, 1] measured from the path’s start (1.0, the default, is the
very end for ArrowEnds::Last, the very start for ArrowEnds::First).
Extension: not part of grid’s arrow().
length_per_linewidth: f64When set above 0, the effective wing length is
max(length, length_per_linewidth * linewidth), so arrowheads scale
up with a thick line. Extension: not part of grid’s arrow().
Implementations§
Trait Implementations§
impl Copy for Arrow
impl StructuralPartialEq for Arrow
Auto Trait Implementations§
impl Freeze for Arrow
impl RefUnwindSafe for Arrow
impl Send for Arrow
impl Sync for Arrow
impl Unpin for Arrow
impl UnsafeUnpin for Arrow
impl UnwindSafe for Arrow
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more