Struct raqote::path_builder::Path
source · pub struct Path {
pub ops: Vec<PathOp>,
pub winding: Winding,
}
Expand description
Represents a complete path usable for filling or stroking.
Fields§
§ops: Vec<PathOp>
§winding: Winding
Implementations§
source§impl 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 Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)