Expand description
Represents a complete path usable for filling or stroking.
Fields
ops: Vec<PathOp>
winding: Winding
Implementations
sourceimpl Path
impl Path
sourcepub fn flatten(&self, tolerance: f32) -> Path
pub fn flatten(&self, tolerance: f32) -> Path
Flattens self
by replacing all QuadTo and CurveTo
commands with an appropriate number of LineTo commands
so that the error is not greater than tolerance
.
sourcepub fn contains_point(&self, tolerance: f32, x: f32, y: f32) -> bool
pub fn contains_point(&self, tolerance: f32, x: f32, y: f32) -> bool
Returns true if the point x
, y
is within the filled
area of of self
. The path will be flattened using tolerance
.
The point is considered contained if it’s on the path.
pub fn transform(self, transform: &Transform) -> Path
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
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