pub struct DrawingPathBuilder(/* private fields */);Available on crate feature
winio only.Expand description
Builder for DrawingPath.
Implementations§
Source§impl DrawingPathBuilder
impl DrawingPathBuilder
Sourcepub fn add_line(&mut self, p: Point2D<f64, LogicalSpace>) -> Result<(), Error>
pub fn add_line(&mut self, p: Point2D<f64, LogicalSpace>) -> Result<(), Error>
Line from current point to the target point.
Sourcepub fn add_arc(
&mut self,
center: Point2D<f64, LogicalSpace>,
radius: Size2D<f64, LogicalSpace>,
start: f64,
end: f64,
clockwise: bool,
) -> Result<(), Error>
pub fn add_arc( &mut self, center: Point2D<f64, LogicalSpace>, radius: Size2D<f64, LogicalSpace>, start: f64, end: f64, clockwise: bool, ) -> Result<(), Error>
Add arc. A line will be created implicitly if the start point is not the current point.
Sourcepub fn add_bezier(
&mut self,
p1: Point2D<f64, LogicalSpace>,
p2: Point2D<f64, LogicalSpace>,
p3: Point2D<f64, LogicalSpace>,
) -> Result<(), Error>
pub fn add_bezier( &mut self, p1: Point2D<f64, LogicalSpace>, p2: Point2D<f64, LogicalSpace>, p3: Point2D<f64, LogicalSpace>, ) -> Result<(), Error>
Add a cubic Bezier curve.
Sourcepub fn build(self, close: bool) -> Result<DrawingPath, Error>
pub fn build(self, close: bool) -> Result<DrawingPath, Error>
Build DrawingPath.
Auto Trait Implementations§
impl Freeze for DrawingPathBuilder
impl RefUnwindSafe for DrawingPathBuilder
impl Send for DrawingPathBuilder
impl Sync for DrawingPathBuilder
impl Unpin for DrawingPathBuilder
impl UnsafeUnpin for DrawingPathBuilder
impl UnwindSafe for DrawingPathBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more