Struct canvas::canvas_data::PathBuilderRef
source · struct PathBuilderRef<'a> {
builder: &'a mut Box<dyn GenericPathBuilder>,
transform: Transform2D<f32>,
}
Expand description
A wrapper around a stored PathBuilder and an optional transformation that should be applied to any points to ensure they are in the matching device space.
Fields§
§builder: &'a mut Box<dyn GenericPathBuilder>
§transform: Transform2D<f32>
Implementations§
source§impl<'a> PathBuilderRef<'a>
impl<'a> PathBuilderRef<'a>
fn line_to(&mut self, pt: &Point2D<f32>)
fn move_to(&mut self, pt: &Point2D<f32>)
fn rect(&mut self, rect: &Rect<f32>)
fn quadratic_curve_to(&mut self, cp: &Point2D<f32>, endpoint: &Point2D<f32>)
fn bezier_curve_to( &mut self, cp1: &Point2D<f32>, cp2: &Point2D<f32>, endpoint: &Point2D<f32>, )
fn arc( &mut self, center: &Point2D<f32>, radius: f32, start_angle: f32, end_angle: f32, ccw: bool, )
pub fn ellipse( &mut self, center: &Point2D<f32>, radius_x: f32, radius_y: f32, rotation_angle: f32, start_angle: f32, end_angle: f32, ccw: bool, )
fn current_point(&mut self) -> Option<Point2D<f32>>
fn close(&mut self)
Auto Trait Implementations§
impl<'a> Freeze for PathBuilderRef<'a>
impl<'a> !RefUnwindSafe for PathBuilderRef<'a>
impl<'a> !Send for PathBuilderRef<'a>
impl<'a> !Sync for PathBuilderRef<'a>
impl<'a> Unpin for PathBuilderRef<'a>
impl<'a> !UnwindSafe for PathBuilderRef<'a>
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert