pub struct MaskRasterizer { /* private fields */ }Expand description
Rasterizes single paths and glyphs into coverage masks with the same
rasterizer, strokes and transforms as CpuRenderer, shifted by whole
pixels. A renderer that composites the masks at their positions (the GPU
path’s atlases) therefore draws what the CPU path draws.
Implementations§
Source§impl MaskRasterizer
impl MaskRasterizer
Sourcepub fn new() -> MaskRasterizer
pub fn new() -> MaskRasterizer
A rasterizer.
Trait Implementations§
Source§impl Debug for MaskRasterizer
impl Debug for MaskRasterizer
Auto Trait Implementations§
impl !RefUnwindSafe for MaskRasterizer
impl !Sync for MaskRasterizer
impl !UnwindSafe for MaskRasterizer
impl Forget for MaskRasterizer
impl Freeze for MaskRasterizerwhere
PhantomData<Srgb>: Freeze,
*const ColorStop is !null: Freeze,
PhantomData<ColorStop>: Freeze,
*const ArcInner<Pixmap> is !null: Freeze,
PhantomData<ArcInner<Pixmap>>: Freeze,
*const f64 is !null: Freeze,
PhantomData<f64>: Freeze,
*const Affine is !null: Freeze,
PhantomData<Affine>: Freeze,
*const ArcInner<MaskRepr> is !null: Freeze,
PhantomData<ArcInner<MaskRepr>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<PathEl>: Freeze,
PhantomData<EncodedPaint>: Freeze,
*const ArcInner<FilterGraph> is !null: Freeze,
PhantomData<ArcInner<FilterGraph>>: Freeze,
*const dyn Dispatcher is !null: Freeze,
PhantomData<dyn Dispatcher>: Freeze,
PhantomData<(u32, Arc<Pixmap>)>: Freeze,
PhantomData<OutlinePath>: Freeze,
PhantomData<(OutlineKey, OutlineEntry)>: Freeze,
PhantomData<(SmallVec<[F2Dot14; 4]>, HashMap<OutlineKey, OutlineEntry>)>: Freeze,
PhantomData<HintEntry>: Freeze,
PhantomData<(f64, f64)>: Freeze,
PhantomData<(GlyphCacheKey, GlyphCacheEntry)>: Freeze,
PhantomData<(SmallVec<[F2Dot14; 4]>, HashMap<GlyphCacheKey, GlyphCacheEntry, FixedState>)>: Freeze,
PhantomData<PendingBitmapUpload>: Freeze,
PhantomData<PendingClearRect>: Freeze,
PhantomData<AtlasCommand>: Freeze,
*const Option<AtlasCommandRecorder> is !null: Freeze,
PhantomData<Option<AtlasCommandRecorder>>: Freeze,
PhantomData<Atlas>: Freeze,
PhantomData<Option<ImageResource>>: Freeze,
PhantomData<usize>: Freeze,
*const RenderContext is !null: Freeze,
PhantomData<RenderContext>: Freeze,
PhantomData<Arc<Pixmap>>: Freeze,
impl Move for MaskRasterizer
impl Send for MaskRasterizerwhere
SmallVec<[ColorStop; 4]>: Send,
Arc<Pixmap>: Send,
SmallVec<[f64; 4]>: Send,
SmallVec<[Affine; 3]>: Send,
Arc<MaskRepr>: Send,
RawVecInner: Send,
Arc<FilterGraph>: Send,
BoxRaw<dyn Dispatcher>: Send,
RawTable<(u32, Arc<Pixmap>)>: Send,
RawTable<(OutlineKey, OutlineEntry)>: Send,
RawTable<(SmallVec<[F2Dot14; 4]>, HashMap<OutlineKey, OutlineEntry>)>: Send,
BoxRaw<HintInstance>: Send,
Arc<LocatedState>: Send,
RawTable<(GlyphCacheKey, GlyphCacheEntry)>: Send,
RawTable<(SmallVec<[F2Dot14; 4]>, HashMap<GlyphCacheKey, GlyphCacheEntry, FixedState>)>: Send,
SmallVec<[Option<AtlasCommandRecorder>; 1]>: Send,
BoxRaw<RenderContext>: Send,
impl Unpin for MaskRasterizerwhere
*const ColorStop is !null: Unpin,
ColorStop: Unpin,
Arc<Pixmap>: Unpin,
*const f64 is !null: Unpin,
f64: Unpin,
*const Affine is !null: Unpin,
Affine: Unpin,
Arc<MaskRepr>: Unpin,
*const u8 is !null: Unpin,
Arc<FilterGraph>: Unpin,
Box<dyn Dispatcher>: Unpin,
Arc<BezPath>: Unpin,
*const F2Dot14 is !null: Unpin,
F2Dot14: Unpin,
Box<HintInstance>: Unpin,
Arc<LocatedState>: Unpin,
*const Option<AtlasCommandRecorder> is !null: Unpin,
Option<AtlasCommandRecorder>: Unpin,
Box<RenderContext>: Unpin,
impl UnsafeUnpin for MaskRasterizerwhere
PhantomData<Srgb>: UnsafeUnpin,
*const ColorStop is !null: UnsafeUnpin,
PhantomData<ColorStop>: UnsafeUnpin,
*const ArcInner<Pixmap> is !null: UnsafeUnpin,
PhantomData<ArcInner<Pixmap>>: UnsafeUnpin,
*const f64 is !null: UnsafeUnpin,
PhantomData<f64>: UnsafeUnpin,
*const Affine is !null: UnsafeUnpin,
PhantomData<Affine>: UnsafeUnpin,
*const ArcInner<MaskRepr> is !null: UnsafeUnpin,
PhantomData<ArcInner<MaskRepr>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<PathEl>: UnsafeUnpin,
PhantomData<EncodedPaint>: UnsafeUnpin,
*const ArcInner<FilterGraph> is !null: UnsafeUnpin,
PhantomData<ArcInner<FilterGraph>>: UnsafeUnpin,
*const dyn Dispatcher is !null: UnsafeUnpin,
PhantomData<dyn Dispatcher>: UnsafeUnpin,
PhantomData<(u32, Arc<Pixmap>)>: UnsafeUnpin,
PhantomData<OutlinePath>: UnsafeUnpin,
PhantomData<(OutlineKey, OutlineEntry)>: UnsafeUnpin,
PhantomData<(SmallVec<[F2Dot14; 4]>, HashMap<OutlineKey, OutlineEntry>)>: UnsafeUnpin,
PhantomData<HintEntry>: UnsafeUnpin,
PhantomData<(f64, f64)>: UnsafeUnpin,
PhantomData<(GlyphCacheKey, GlyphCacheEntry)>: UnsafeUnpin,
PhantomData<(SmallVec<[F2Dot14; 4]>, HashMap<GlyphCacheKey, GlyphCacheEntry, FixedState>)>: UnsafeUnpin,
PhantomData<PendingBitmapUpload>: UnsafeUnpin,
PhantomData<PendingClearRect>: UnsafeUnpin,
PhantomData<AtlasCommand>: UnsafeUnpin,
*const Option<AtlasCommandRecorder> is !null: UnsafeUnpin,
PhantomData<Option<AtlasCommandRecorder>>: UnsafeUnpin,
PhantomData<Atlas>: UnsafeUnpin,
PhantomData<Option<ImageResource>>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
*const RenderContext is !null: UnsafeUnpin,
PhantomData<RenderContext>: UnsafeUnpin,
PhantomData<Arc<Pixmap>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);