pub struct Path {
pub elements: Property<Vec<PathElement>>,
pub stroke: Property<Stroke>,
pub fill: Property<Fill>,
pub material: Property<Material>,
pub smoothing: Property<PathSmoothing>,
pub draw_start: Property<UnitValue>,
pub draw_end: Property<UnitValue>,
}Expand description
A 2D vector path for arbitrary Bézier and line-segment chains.
elements describes the path in local coordinates. fill paints the
interior of closed contours, while stroke paints the path itself; for
open subpaths, the stroke cap controls the exposed endpoints. Path geometry
may draw outside the element’s layout bounds; use a Frame or Mask when
that overflow should be clipped.
Fields§
§elements: Property<Vec<PathElement>>The path commands and control points, expressed in local coordinates.
stroke: Property<Stroke>The stroke applied along the path centerline.
fill: Property<Fill>The fill applied to the interior of closed contours.
material: Property<Material>Light-reactive surface response.
smoothing: Property<PathSmoothing>Optional curve smoothing applied before rendering path geometry.
draw_start: Property<UnitValue>Start position of the visible stroke range over the path’s total length.
draw_end: Property<UnitValue>End position of the visible stroke range over the path’s total length.
Implementations§
Source§impl Path
impl Path
Sourcepub fn line_to(path: Vec<PathElement>, x: Size, y: Size) -> Vec<PathElement>
pub fn line_to(path: Vec<PathElement>, x: Size, y: Size) -> Vec<PathElement>
Appends a straight line segment to the provided point.
Sourcepub fn curve_to(
path: Vec<PathElement>,
h_x: Size,
h_y: Size,
x: Size,
y: Size,
) -> Vec<PathElement>
pub fn curve_to( path: Vec<PathElement>, h_x: Size, h_y: Size, x: Size, y: Size, ) -> Vec<PathElement>
Appends a quadratic Bézier curve with one control point.
Trait Implementations§
Source§impl CoercionRules for Path
impl CoercionRules for Path
Source§impl<'de> Deserialize<'de> for Path
impl<'de> Deserialize<'de> for Path
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl HelperFunctions for Path
impl HelperFunctions for Path
Source§fn register_all_functions()
fn register_all_functions()
impl ImplToFromPaxAny for Path
Source§impl Interpolatable for Path
impl Interpolatable for Path
Source§fn interpolate(&self, _other: &Self, _t: f64) -> Self
fn interpolate(&self, _other: &Self, _t: f64) -> Self
Source§impl ToPaxValue for Path
impl ToPaxValue for Path
Source§fn to_pax_value(self) -> PaxValue
fn to_pax_value(self) -> PaxValue
PaxValue.Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin for Path
impl UnwindSafe for Path
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> PropertyValue for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Source§impl<T> ToFromPaxAny for Twhere
T: ImplToFromPaxAny,
impl<T> ToFromPaxAny for Twhere
T: ImplToFromPaxAny,
Source§fn to_pax_any(self) -> PaxAny
fn to_pax_any(self) -> PaxAny
PaxAny.Source§fn from_pax_any(pax_any: PaxAny) -> Result<T, String>
fn from_pax_any(pax_any: PaxAny) -> Result<T, String>
PaxAny.