epaint::tessellator

Struct TessellationOptions

Source
pub struct TessellationOptions {
    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 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: bool

Use “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: f32

The 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: bool

If true (default) cull certain primitives before tessellating them. This likely makes

§prerasterized_discs: bool

If true, small filled circled will be optimized by using pre-rasterized circled from the font atlas.

§round_text_to_pixels: bool

If true (default) align text to mesh grid. This makes the text sharper on most platforms.

§debug_paint_clip_rects: bool

Output the clip rectangles to be painted.

§debug_paint_text_rects: bool

Output the text-containing rectangles.

§debug_ignore_clip_rects: bool

If true, no clipping will be done.

§bezier_tolerance: f32

The maximum distance between the original curve and the flattened curve.

§epsilon: f32

The default value will be 1.0e-5, it will be used during float compare.

§parallel_tessellation: bool

If rayon feature is activated, should we parallelize tessellation?

§validate_meshes: bool

If 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

Source§

fn clone(&self) -> TessellationOptions

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TessellationOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TessellationOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TessellationOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TessellationOptions

Source§

fn eq(&self, other: &TessellationOptions) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for TessellationOptions

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for TessellationOptions

Source§

impl StructuralPartialEq for TessellationOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,