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§
§impl Clone for TessellationOptions
impl Clone for TessellationOptions
§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§impl Debug for TessellationOptions
impl Debug for TessellationOptions
§impl Default for TessellationOptions
impl Default for TessellationOptions
§fn default() -> TessellationOptions
fn default() -> TessellationOptions
§impl<'de> Deserialize<'de> for TessellationOptionswhere
TessellationOptions: Default,
impl<'de> Deserialize<'de> for TessellationOptionswhere
TessellationOptions: Default,
§fn deserialize<__D>(
__deserializer: __D
) -> Result<TessellationOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TessellationOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for TessellationOptions
impl PartialEq for TessellationOptions
§fn eq(&self, other: &TessellationOptions) -> bool
fn eq(&self, other: &TessellationOptions) -> bool
self
and other
values to be equal, and is used
by ==
.§impl Serialize for TessellationOptions
impl Serialize for TessellationOptions
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
§impl Widget for &mut TessellationOptions
impl Widget for &mut TessellationOptions
impl Copy for TessellationOptions
impl StructuralPartialEq for TessellationOptions
Auto Trait Implementations§
impl Freeze for TessellationOptions
impl RefUnwindSafe for TessellationOptions
impl Send for TessellationOptions
impl Sync for TessellationOptions
impl Unpin for TessellationOptions
impl UnwindSafe for TessellationOptions
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request