pub enum AntiAlias {
On,
Off,
FullCover,
}Expand description
Whether a primitive’s edges are antialiased.
The three modes are AGG’s three, and they are genuinely three rather than a flag and its negation:
Onintegrates coverage and writes it as alpha.Offis the oracle’saliased_path, which thresholds the same coverage at> 127 -> 255rather than turning the rasterizer off. It is what the axis-aligned rect fast path and a hard-edged clip ask for.FullCoverkeeps the rasterizer’s choice of which pixels a span covers and then ignores the coverage value, writing every one of them at the source alpha.
The distinction between the last two is the whole reason FullCover
exists. Thresholding drops a pixel two abutting cells each cover halfway,
so a subdivided Coons patch shows white pin-holes along every internal
seam; full_cover paints it from both cells, which is what makes the
patch continuous.
Variants§
On
Antialiased, the default for every ordinary fill and stroke.
Off
Hard-edged: coverage thresholded at its midpoint.
FullCover
Every touched pixel at full alpha, whatever its coverage.
Trait Implementations§
impl Copy for AntiAlias
impl Eq for AntiAlias
impl StructuralPartialEq for AntiAlias
Auto Trait Implementations§
impl Freeze for AntiAlias
impl RefUnwindSafe for AntiAlias
impl Send for AntiAlias
impl Sync for AntiAlias
impl Unpin for AntiAlias
impl UnsafeUnpin for AntiAlias
impl UnwindSafe for AntiAlias
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