Type Alias nannou::draw::primitive::arrow::DrawingArrow

source ·
pub type DrawingArrow<'a> = Drawing<'a, Arrow>;
Expand description

The drawing context for a line.

Aliased Type§

struct DrawingArrow<'a> { /* private fields */ }

Implementations§

source§

impl<'a> DrawingArrow<'a>

source

pub fn weight(self, weight: f32) -> Self

Short-hand for the stroke_weight method.

source

pub fn tolerance(self, tolerance: f32) -> Self

Short-hand for the stroke_tolerance method.

source

pub fn start(self, start: Point2) -> Self

Specify the start point of the arrow.

source

pub fn end(self, end: Point2) -> Self

Specify the end point of the arrow.

source

pub fn points(self, start: Point2, end: Point2) -> Self

Specify the start and end points of the arrow.

source

pub fn head_length(self, length: f32) -> Self

The length of the arrow head.

By default, this is equal to weight * 4.0.

This value will be clamped to the length of the line itself.

source

pub fn head_width(self, width: f32) -> Self

The width of the arrow head.

By default, this is equal to weight * 2.0.