pub struct TessellationOptions {Show 14 fields
pub feathering: bool,
pub feathering_size_in_pixels: f32,
pub coarse_tessellation_culling: bool,
pub prerasterized_discs: bool,
pub round_text_to_pixels: bool,
pub round_line_segments_to_pixels: bool,
pub round_rects_to_pixels: bool,
pub debug_paint_clip_rects: bool,
pub debug_paint_text_rects: bool,
pub debug_ignore_clip_rects: bool,
pub bezier_tolerance: f32,
pub epsilon: f32,
pub parallel_tessellation: bool,
pub validate_meshes: bool,
}Expand description
Tessellation quality options
Fields§
§feathering: boolUse “feathering” to smooth out the edges of shapes as a form of anti-aliasing.
Feathering works by making each edge into a thin gradient into transparency.
The size of this edge is controlled by Self::feathering_size_in_pixels.
This makes shapes appear smoother, but requires more triangles and is therefore slower.
This setting does not affect text.
Default: true.
feathering_size_in_pixels: f32The size of the feathering, in physical pixels.
The default, and suggested, value for this is 1.0.
If you use a larger value, edges will appear blurry.
coarse_tessellation_culling: boolIf true (default) cull certain primitives before tessellating them.
This likely makes
prerasterized_discs: boolIf true, small filled circled will be optimized by using pre-rasterized circled
from the font atlas.
round_text_to_pixels: boolIf true (default) align text to the physical pixel grid.
This makes the text sharper on most platforms.
round_line_segments_to_pixels: boolIf true (default), align right-angled line segments to the physical pixel grid.
This makes the line segments appear crisp on any display.
round_rects_to_pixels: boolIf true (default), align rectangles to the physical pixel grid.
This makes the rectangle strokes more crisp, and makes filled rectangles tile perfectly (without feathering).
You can override this with crate::RectShape::round_to_pixels.
debug_paint_clip_rects: boolOutput the clip rectangles to be painted.
debug_paint_text_rects: boolOutput the text-containing rectangles.
debug_ignore_clip_rects: boolIf true, no clipping will be done.
bezier_tolerance: f32The maximum distance between the original curve and the flattened curve.
epsilon: f32The default value will be 1.0e-5, it will be used during float compare.
parallel_tessellation: boolIf rayon feature is activated, should we parallelize tessellation?
validate_meshes: boolIf true, invalid meshes will be silently ignored.
If false, invalid meshes will cause a panic.
The default is false to save performance.
Trait Implementations§
Source§impl Clone for TessellationOptions
impl Clone for TessellationOptions
Source§fn clone(&self) -> TessellationOptions
fn clone(&self) -> TessellationOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more