pub struct Builder { /* private fields */ }
canvas
only.Implementations
sourceimpl Builder
impl Builder
sourcepub fn move_to(&mut self, point: Point)
pub fn move_to(&mut self, point: Point)
Moves the starting point of a new sub-path to the given Point
.
sourcepub fn line_to(&mut self, point: Point)
pub fn line_to(&mut self, point: Point)
Connects the last point in the Path
to the given Point
with a
straight line.
sourcepub fn arc_to(&mut self, a: Point, b: Point, radius: f32)
pub fn arc_to(&mut self, a: Point, b: Point, radius: f32)
Adds a circular arc to the Path
with the given control points and
radius.
This essentially draws a straight line segment from the current
position to a
, but fits a circular arc of radius
tangent to that
segment and tangent to the line between a
and b
.
With another .line_to(b)
, the result will be a path connecting the
starting point and b
with straight line segments towards a
and a
circular arc smoothing out the corner at a
.
See the HTML5 specification of arcTo
for more details and examples.
sourcepub fn ellipse(&mut self, arc: Elliptical)
pub fn ellipse(&mut self, arc: Elliptical)
Adds an ellipse to the Path
using a clockwise direction.
sourcepub fn bezier_curve_to(&mut self, control_a: Point, control_b: Point, to: Point)
pub fn bezier_curve_to(&mut self, control_a: Point, control_b: Point, to: Point)
Adds a cubic Bézier curve to the Path
given its two control points
and its end point.
sourcepub fn quadratic_curve_to(&mut self, control: Point, to: Point)
pub fn quadratic_curve_to(&mut self, control: Point, to: Point)
Adds a quadratic Bézier curve to the Path
given its control point
and its end point.
sourcepub fn rectangle(&mut self, top_left: Point, size: Size<f32>)
pub fn rectangle(&mut self, top_left: Point, size: Size<f32>)
Adds a rectangle to the Path
given its top-left corner coordinate
and its Size
.
sourcepub fn circle(&mut self, center: Point, radius: f32)
pub fn circle(&mut self, center: Point, radius: f32)
Adds a circle to the Path
given its center coordinate and its
radius.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
sourcefn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
sourcefn adapt_into(self) -> D
fn adapt_into(self) -> D
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
sourcefn into_color(self) -> U
fn into_color(self) -> U
sourceimpl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
sourcefn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_big_endian()
.sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_native_endian()
.sourceimpl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
sourcefn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds
error is returned which contains
the unclamped color. Read more