pub enum ThinLineMode {
Default,
Solid,
Shape,
}Expand description
Thin-line rendering treatment.
Controls how strokes whose device-space width is less than one pixel are
drawn. The default preserves the hairline width via shape anti-aliasing
when stroke adjustment (SA) is on.
§Extension policy
This enum is not #[non_exhaustive] because exhaustive matches on it
are used throughout the rasterizer to guarantee every mode is handled; the
compiler enforces this at every call site. Adding a new variant is an
intentional breaking change that forces all match sites to be updated.
Variants§
Default
Preserve the hairline width.
When stroke adjustment is on and the device-space line width is less than half a pixel, the line is drawn as a shaped (anti-aliased) stroke; otherwise it is drawn solid.
Solid
Render as a solid opaque 1-pixel line regardless of width.
Shape
Always draw with shape anti-aliasing even for sub-pixel widths.
Trait Implementations§
Source§impl Clone for ThinLineMode
impl Clone for ThinLineMode
Source§fn clone(&self) -> ThinLineMode
fn clone(&self) -> ThinLineMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ThinLineMode
impl Debug for ThinLineMode
Source§impl Default for ThinLineMode
impl Default for ThinLineMode
Source§fn default() -> ThinLineMode
fn default() -> ThinLineMode
Source§impl Hash for ThinLineMode
impl Hash for ThinLineMode
Source§impl PartialEq for ThinLineMode
impl PartialEq for ThinLineMode
Source§fn eq(&self, other: &ThinLineMode) -> bool
fn eq(&self, other: &ThinLineMode) -> bool
self and other values to be equal, and is used by ==.