Struct lyon_path::builder::Transformed
source · [−]pub struct Transformed<Builder, Transform> { /* private fields */ }
Expand description
Builds a path with a transformation applied.
Implementations
sourceimpl<Builder, Transform> Transformed<Builder, Transform>
impl<Builder, Transform> Transformed<Builder, Transform>
pub fn new(builder: Builder, transform: Transform) -> Self
pub fn set_transform(&mut self, transform: Transform)
Trait Implementations
sourceimpl<Builder: Build, Transform> Build for Transformed<Builder, Transform>
impl<Builder: Build, Transform> Build for Transformed<Builder, Transform>
sourceimpl<Builder, Transform> PathBuilder for Transformed<Builder, Transform> where
Builder: PathBuilder,
Transform: Transformation<f32>,
impl<Builder, Transform> PathBuilder for Transformed<Builder, Transform> where
Builder: PathBuilder,
Transform: Transformation<f32>,
fn num_attributes(&self) -> usize
sourcefn begin(&mut self, at: Point, attributes: Attributes<'_>) -> EndpointId
fn begin(&mut self, at: Point, attributes: Attributes<'_>) -> EndpointId
Starts a new sub-path at a given position. Read more
sourcefn line_to(&mut self, to: Point, attributes: Attributes<'_>) -> EndpointId
fn line_to(&mut self, to: Point, attributes: Attributes<'_>) -> EndpointId
Adds a line segment to the current sub-path. Read more
sourcefn quadratic_bezier_to(
&mut self,
ctrl: Point,
to: Point,
attributes: Attributes<'_>
) -> EndpointId
fn quadratic_bezier_to(
&mut self,
ctrl: Point,
to: Point,
attributes: Attributes<'_>
) -> EndpointId
Adds a quadratic bézier curve to the current sub-path. Read more
sourcefn cubic_bezier_to(
&mut self,
ctrl1: Point,
ctrl2: Point,
to: Point,
attributes: Attributes<'_>
) -> EndpointId
fn cubic_bezier_to(
&mut self,
ctrl1: Point,
ctrl2: Point,
to: Point,
attributes: Attributes<'_>
) -> EndpointId
Adds a cubic bézier curve to the current sub-path. Read more
sourcefn reserve(&mut self, endpoints: usize, ctrl_points: usize)
fn reserve(&mut self, endpoints: usize, ctrl_points: usize)
Hints at the builder that a certain number of endpoints and control points will be added. Read more
sourcefn path_event(&mut self, event: PathEvent, attributes: Attributes<'_>)
fn path_event(&mut self, event: PathEvent, attributes: Attributes<'_>)
Applies the provided path event. Read more
fn event(&mut self, event: Event<(Point, Attributes<'_>), Point>)
sourcefn add_polygon(&mut self, polygon: Polygon<'_, Point>, attributes: Attributes<'_>)
fn add_polygon(&mut self, polygon: Polygon<'_, Point>, attributes: Attributes<'_>)
Adds a sub-path from a polygon. Read more
sourcefn add_point(&mut self, at: Point, attributes: Attributes<'_>) -> EndpointId
fn add_point(&mut self, at: Point, attributes: Attributes<'_>) -> EndpointId
Adds a sub-path containing a single point. Read more
sourcefn add_line_segment(
&mut self,
line: &LineSegment<f32>,
attributes: Attributes<'_>
) -> (EndpointId, EndpointId)
fn add_line_segment(
&mut self,
line: &LineSegment<f32>,
attributes: Attributes<'_>
) -> (EndpointId, EndpointId)
Adds a sub-path containing a single line segment. Read more
sourcefn add_ellipse(
&mut self,
center: Point,
radii: Vector,
x_rotation: Angle,
winding: Winding,
attributes: Attributes<'_>
)
fn add_ellipse(
&mut self,
center: Point,
radii: Vector,
x_rotation: Angle,
winding: Winding,
attributes: Attributes<'_>
)
Adds a sub-path containing an ellipse. Read more
sourcefn add_circle(
&mut self,
center: Point,
radius: f32,
winding: Winding,
attributes: Attributes<'_>
) where
Self: Sized,
fn add_circle(
&mut self,
center: Point,
radius: f32,
winding: Winding,
attributes: Attributes<'_>
) where
Self: Sized,
Adds a sub-path containing a circle. Read more
sourcefn add_rectangle(
&mut self,
rect: &Box2D,
winding: Winding,
attributes: Attributes<'_>
)
fn add_rectangle(
&mut self,
rect: &Box2D,
winding: Winding,
attributes: Attributes<'_>
)
Adds a sub-path containing a rectangle. Read more
sourcefn add_rounded_rectangle(
&mut self,
rect: &Box2D,
radii: &BorderRadii,
winding: Winding,
custom_attributes: Attributes<'_>
) where
Self: Sized,
fn add_rounded_rectangle(
&mut self,
rect: &Box2D,
radii: &BorderRadii,
winding: Winding,
custom_attributes: Attributes<'_>
) where
Self: Sized,
Adds a sub-path containing a rectangle. Read more
sourcefn flattened(self, tolerance: f32) -> Flattened<Self> where
Self: Sized,
fn flattened(self, tolerance: f32) -> Flattened<Self> where
Self: Sized,
Returns a builder that approximates all curves with sequences of line segments.
sourcefn transformed<Transform>(
self,
transform: Transform
) -> Transformed<Self, Transform> where
Self: Sized,
Transform: Transformation<f32>,
fn transformed<Transform>(
self,
transform: Transform
) -> Transformed<Self, Transform> where
Self: Sized,
Transform: Transformation<f32>,
Returns a builder that applies the given transformation to all positions.
Auto Trait Implementations
impl<Builder, Transform> RefUnwindSafe for Transformed<Builder, Transform> where
Builder: RefUnwindSafe,
Transform: RefUnwindSafe,
impl<Builder, Transform> Send for Transformed<Builder, Transform> where
Builder: Send,
Transform: Send,
impl<Builder, Transform> Sync for Transformed<Builder, Transform> where
Builder: Sync,
Transform: Sync,
impl<Builder, Transform> Unpin for Transformed<Builder, Transform> where
Builder: Unpin,
Transform: Unpin,
impl<Builder, Transform> UnwindSafe for Transformed<Builder, Transform> where
Builder: UnwindSafe,
Transform: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more