pub struct PathTessellator {
pub tolerance: f64,
pub vertices: Vec<[f32; 2]>,
pub indices: Vec<u32>,
}Expand description
Path tessellation for GPU rendering.
Fields§
§tolerance: f64Tolerance for curve flattening
vertices: Vec<[f32; 2]>Generated vertices (x, y)
indices: Vec<u32>Triangle indices
Implementations§
Source§impl PathTessellator
impl PathTessellator
Sourcepub fn with_default_tolerance() -> Self
pub fn with_default_tolerance() -> Self
Create with default tolerance.
Sourcepub fn tessellate_polygon(&mut self, points: &[Point2D])
pub fn tessellate_polygon(&mut self, points: &[Point2D])
Tessellate a filled polygon.
Sourcepub fn tessellate_stroke(&mut self, points: &[Point2D], width: f64)
pub fn tessellate_stroke(&mut self, points: &[Point2D], width: f64)
Tessellate a stroked polyline.
Sourcepub fn tessellate_circle(
&mut self,
center: Point2D,
radius: f64,
segments: usize,
)
pub fn tessellate_circle( &mut self, center: Point2D, radius: f64, segments: usize, )
Tessellate a circle.
Sourcepub fn tessellate_rect(&mut self, x: f64, y: f64, width: f64, height: f64)
pub fn tessellate_rect(&mut self, x: f64, y: f64, width: f64, height: f64)
Tessellate a rectangle.
Sourcepub fn vertex_count(&self) -> usize
pub fn vertex_count(&self) -> usize
Get vertex count.
Sourcepub fn index_count(&self) -> usize
pub fn index_count(&self) -> usize
Get index count.
Sourcepub fn triangle_count(&self) -> usize
pub fn triangle_count(&self) -> usize
Get triangle count.
Trait Implementations§
Source§impl Clone for PathTessellator
impl Clone for PathTessellator
Source§impl Debug for PathTessellator
impl Debug for PathTessellator
Auto Trait Implementations§
impl Freeze for PathTessellator
impl RefUnwindSafe for PathTessellator
impl Send for PathTessellator
impl Sync for PathTessellator
impl Unpin for PathTessellator
impl UnsafeUnpin for PathTessellator
impl UnwindSafe for PathTessellator
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