pub struct StrokeMarker2d { /* private fields */ }Expand description
Reusable arrow marker definition for a line endpoint.
Marker dimensions are logical pixels even when the line body uses a world width, keeping scientific annotations readable under camera zoom. A marked endpoint ignores the ordinary cap: the body ends with a butt boundary at the path endpoint, which is also the marker base. The filled triangle grows outward from the path, so markers remain interior-disjoint from arbitrarily short, dashed, or camera-scaled terminal segments.
Implementations§
Source§impl StrokeMarker2d
impl StrokeMarker2d
Sourcepub const fn arrow(length: LogicalPixels, width: LogicalPixels) -> Self
pub const fn arrow(length: LogicalPixels, width: LogicalPixels) -> Self
Builds a filled triangular arrow marker.
Sourcepub const fn length(self) -> LogicalPixels
pub const fn length(self) -> LogicalPixels
Returns marker length along the endpoint tangent.
Sourcepub const fn width(self) -> LogicalPixels
pub const fn width(self) -> LogicalPixels
Returns full marker width perpendicular to the endpoint tangent.
Trait Implementations§
Source§impl Clone for StrokeMarker2d
impl Clone for StrokeMarker2d
Source§fn clone(&self) -> StrokeMarker2d
fn clone(&self) -> StrokeMarker2d
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StrokeMarker2d
Source§impl Debug for StrokeMarker2d
impl Debug for StrokeMarker2d
Source§impl PartialEq for StrokeMarker2d
impl PartialEq for StrokeMarker2d
impl StructuralPartialEq for StrokeMarker2d
Auto Trait Implementations§
impl Freeze for StrokeMarker2d
impl RefUnwindSafe for StrokeMarker2d
impl Send for StrokeMarker2d
impl Sync for StrokeMarker2d
impl Unpin for StrokeMarker2d
impl UnsafeUnpin for StrokeMarker2d
impl UnwindSafe for StrokeMarker2d
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