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.