Skip to main content

LineNode

Struct LineNode 

Source
pub struct LineNode {
Show 18 fields pub id: String, pub name: Option<String>, pub role: Option<String>, pub x1: Option<Dimension>, pub y1: Option<Dimension>, pub x2: Option<Dimension>, pub y2: Option<Dimension>, pub style: Option<String>, pub stroke: Option<PropertyValue>, pub stroke_width: Option<PropertyValue>, pub stroke_dash: Option<PropertyValue>, pub stroke_gap: Option<PropertyValue>, pub stroke_linecap: Option<String>, pub opacity: Option<f64>, pub visible: Option<bool>, pub locked: Option<bool>, pub source_span: Option<Span>, pub unknown_props: BTreeMap<String, UnknownProperty>,
}
Expand description

A line node (stroke-only; defined by two endpoints x1/y1/x2/y2).

Unlike rect and ellipse there is no bounding box, no fill, no radius, no rotate, and no stroke-alignment — a line is a 1-D geometry whose only visual property is its centered stroke.

Fields§

§id: String§name: Option<String>§role: Option<String>§x1: Option<Dimension>§y1: Option<Dimension>§x2: Option<Dimension>§y2: Option<Dimension>§style: Option<String>§stroke: Option<PropertyValue>§stroke_width: Option<PropertyValue>§stroke_dash: Option<PropertyValue>

Dash segment length in pixels; None = solid stroke.

§stroke_gap: Option<PropertyValue>

Gap length in pixels between dashes; defaults to stroke_dash when absent.

§stroke_linecap: Option<String>

Dash end-cap style: "butt" (default), "round", or "square".

§opacity: Option<f64>§visible: Option<bool>§locked: Option<bool>§source_span: Option<Span>

Source declaration span, when available.

§unknown_props: BTreeMap<String, UnknownProperty>

Unknown properties preserved for forward-compat.

Trait Implementations§

Source§

impl Clone for LineNode

Source§

fn clone(&self) -> LineNode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LineNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for LineNode

Source§

fn eq(&self, other: &LineNode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for LineNode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.