pub struct DrawPolyline {
pub points: Vec<Point>,
pub stroke: StrokeStyle,
}Expand description
Connected line segments rendered with one stroke style.
Zero or one point cannot form a segment but is accepted; allocation size is proportional to the caller-provided point count.
§Examples
use ailloli_ui_core::{Color, Point, StrokeStyle};
use ailloli_ui_runtime::scene::DrawPolyline;
let line = DrawPolyline {
points: vec![Point::new(0.0, 0.0), Point::new(10.0, 5.0)],
stroke: StrokeStyle::new(2.0, Color::WHITE),
};
assert_eq!(line.points.len(), 2);Fields§
§points: Vec<Point>Vertices in window-space logical pixels, in traversal order.
stroke: StrokeStyleWidth, color, cap, join, and miter settings for every segment.
Trait Implementations§
Source§impl Clone for DrawPolyline
impl Clone for DrawPolyline
Source§fn clone(&self) -> DrawPolyline
fn clone(&self) -> DrawPolyline
Returns a copy 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 DrawPolyline
impl Debug for DrawPolyline
Source§impl PartialEq for DrawPolyline
impl PartialEq for DrawPolyline
impl StructuralPartialEq for DrawPolyline
Auto Trait Implementations§
impl Freeze for DrawPolyline
impl RefUnwindSafe for DrawPolyline
impl Send for DrawPolyline
impl Sync for DrawPolyline
impl Unpin for DrawPolyline
impl UnwindSafe for DrawPolyline
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.