pub struct Renderer { /* private fields */ }Expand description
The fonts and text layout state a renderer keeps between paints.
Implementations§
Source§impl Renderer
impl Renderer
Sourcepub fn drawing(
&mut self,
scene: &Scene,
theme: Theme,
after: Option<&Drawing>,
) -> Result<Drawing, Undrawable>
pub fn drawing( &mut self, scene: &Scene, theme: Theme, after: Option<&Drawing>, ) -> Result<Drawing, Undrawable>
The scene laid out once and made into its display list in theme —
every color its value there — or why it can’t be drawn: images and
shadows that don’t fit the GPU’s atlas together. What the PNG, the
canvas and devpage check all start from.
Each image is painted under a blob of its own, made in the order the
drawing first paints it — except that a drawing made after the one
a canvas last showed, painting the same images in the same order,
paints that drawing’s: the GPU then keeps the atlas it has, which
holds exactly them, placed as a fresh one would.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Renderer
impl !RefUnwindSafe for Renderer
impl !UnwindSafe for Renderer
impl Forget for Renderer
impl Move for Renderer
impl Send for Rendererwhere
Arc<FamilyNameMap>: Send,
Arc<GenericFamilyMap>: Send,
RawTable<(Arc<[u8]>, FamilyName)>: Send,
RawTable<(FamilyId, FamilyName)>: Send,
RawTable<(FamilyId, Option<FamilyInfo>)>: Send,
SmallVec<[FamilyId; 2]>: Send,
RawTable<(Script, PerScript)>: Send,
Arc<Shared>: Send,
RawVecInner: Send,
Arc<FamilyInner>: Send,
SmallVec<[QueryFont; 1]>: Send,
Arc<dyn AsRef<[u8]> + Sync + Send>: Send,
RawTable<(SourceId, Entry<Blob<u8>>)>: Send,
Arc<Mutex<Shared>>: Send,
NodeRef<Owned, FontId, SetValZST, LeafOrInternal>: Send,
BoxRaw<(FontId, SetValZST)>: Send,
OnceLock<Option<Box<LookupInfo>>>: Send,
Atomic<u16>: Send,
Atomic<usize>: Send,
BoxRaw<hb_cache_core_t<16, 8, 256, Atomic<u16>>>: Send,
Atomic<u32>: Send,
BoxRaw<[FontVariation]>: Send,
SmallVec<[F2Dot14; 11]>: Send,
SmallVec<[u8; 8]>: Send,
BoxRaw<[Feature]>: Send,
&'static hb_ot_shaper_t: Send,
BoxRaw<dyn Any + Sync + Send>: Send,
SmallVec<[Feature; 4]>: Send,
InternalBitFlags: Send,
RawTable<(ImageId, ImageData)>: Send,
impl Sync for Rendererwhere
Arc<FamilyNameMap>: Sync,
Arc<GenericFamilyMap>: Sync,
RawTable<(Arc<[u8]>, FamilyName)>: Sync,
RawTable<(FamilyId, FamilyName)>: Sync,
RawTable<(FamilyId, Option<FamilyInfo>)>: Sync,
SmallVecData<[FamilyId; 2]>: Sync,
FamilyId: Sync,
RawTable<(Script, PerScript)>: Sync,
Arc<Shared>: Sync,
RawVecInner: Sync,
Arc<FamilyInner>: Sync,
SmallVecData<[QueryFont; 1]>: Sync,
QueryFont: Sync,
Arc<dyn AsRef<[u8]> + Sync + Send>: Sync,
RawTable<(SourceId, Entry<Blob<u8>>)>: Sync,
Arc<Mutex<Shared>>: Sync,
NodeRef<Owned, FontId, SetValZST, LeafOrInternal>: Sync,
BoxRaw<(FontId, SetValZST)>: Sync,
OnceLock<Option<Box<LookupInfo>>>: Sync,
Atomic<u16>: Sync,
Atomic<usize>: Sync,
BoxRaw<hb_cache_core_t<16, 8, 256, Atomic<u16>>>: Sync,
Atomic<u32>: Sync,
BoxRaw<[FontVariation]>: Sync,
SmallVecData<[F2Dot14; 11]>: Sync,
F2Dot14: Sync,
SmallVecData<[u8; 8]>: Sync,
u8: Sync,
BoxRaw<[Feature]>: Sync,
BoxRaw<dyn Any + Sync + Send>: Sync,
SmallVecData<[Feature; 4]>: Sync,
Feature: Sync,
InternalBitFlags: Sync,
RawTable<(ImageId, ImageData)>: Sync,
impl Unpin for Rendererwhere
Arc<FamilyNameMap>: Unpin,
Arc<GenericFamilyMap>: Unpin,
*const u8 is !null: Unpin,
Arc<[u8]>: Unpin,
Arc<str>: Unpin,
Arc<FamilyInner>: Unpin,
*const FamilyId is !null: Unpin,
FamilyId: Unpin,
Arc<Shared>: Unpin,
Arc<dyn AsRef<[u8]> + Sync + Send>: Unpin,
*const QueryFont is !null: Unpin,
QueryFont: Unpin,
Arc<Mutex<Shared>>: Unpin,
*const LeafNode<FontId, SetValZST> is !null: Unpin,
Box<(FontId, SetValZST)>: Unpin,
Align4<u32>: Unpin,
Box<LookupInfo>: Unpin,
Atomic<u16>: Unpin,
Align8<usize>: Unpin,
Box<hb_cache_core_t<16, 8, 256, Atomic<u16>>>: Unpin,
Atomic<u32>: Unpin,
Box<[FontVariation]>: Unpin,
*const F2Dot14 is !null: Unpin,
F2Dot14: Unpin,
u8: Unpin,
Box<[Feature]>: Unpin,
&'static hb_ot_shaper_t: Unpin,
Box<dyn Any + Sync + Send>: Unpin,
*const Feature is !null: Unpin,
Feature: Unpin,
InternalBitFlags: Unpin,
impl UnsafeUnpin for Rendererwhere
*const ArcInner<FamilyNameMap> is !null: UnsafeUnpin,
PhantomData<ArcInner<FamilyNameMap>>: UnsafeUnpin,
*const ArcInner<GenericFamilyMap> is !null: UnsafeUnpin,
PhantomData<ArcInner<GenericFamilyMap>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(Arc<[u8]>, FamilyName)>: UnsafeUnpin,
PhantomData<(FamilyId, FamilyName)>: UnsafeUnpin,
PhantomData<(FamilyId, Option<FamilyInfo>)>: UnsafeUnpin,
*const FamilyId is !null: UnsafeUnpin,
PhantomData<FamilyId>: UnsafeUnpin,
PhantomData<(Script, PerScript)>: UnsafeUnpin,
*const ArcInner<Shared> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shared>>: UnsafeUnpin,
PhantomData<CachedFamily>: UnsafeUnpin,
PhantomData<(SourceId, Entry<Blob<u8>>)>: UnsafeUnpin,
*const ArcInner<Mutex<Shared>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Shared>>>: UnsafeUnpin,
PhantomData<Blob<u8>>: UnsafeUnpin,
*const LeafNode<FontId, SetValZST> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(FontId, SetValZST)>>: UnsafeUnpin,
PhantomData<(usize, usize)>: UnsafeUnpin,
PhantomData<FontVariation>: UnsafeUnpin,
PhantomData<FontFeature>: UnsafeUnpin,
PhantomData<ResolvedStyle<()>>: UnsafeUnpin,
PhantomData<StyleRun>: UnsafeUnpin,
PhantomData<LayoutInlineBox>: UnsafeUnpin,
PhantomData<BidiLevel>: UnsafeUnpin,
PhantomData<BidiClass>: UnsafeUnpin,
PhantomData<(usize, char, BidiMirroringGlyph)>: UnsafeUnpin,
PhantomData<Run>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<CharInfo>: UnsafeUnpin,
PhantomData<(Range<usize>, LineBreakConfig)>: UnsafeUnpin,
PhantomData<Range<usize>>: UnsafeUnpin,
PhantomData<RangedProperty<()>>: UnsafeUnpin,
PhantomData<RangedStyle<()>>: UnsafeUnpin,
PhantomData<StyleTreeNode<()>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<u16>: UnsafeUnpin,
PhantomData<Entry<ShapeDataKey, ShaperData>>: UnsafeUnpin,
PhantomData<Entry<ShapeInstanceId, ShaperInstance>>: UnsafeUnpin,
PhantomData<Entry<ShapePlanId, hb_ot_shape_plan_t>>: UnsafeUnpin,
InternalBitFlags: UnsafeUnpin,
PhantomData<GlyphInfo>: UnsafeUnpin,
PhantomData<GlyphPosition>: UnsafeUnpin,
PhantomData<BitPage>: UnsafeUnpin,
PhantomData<PageInfo>: UnsafeUnpin,
Align8<usize>: UnsafeUnpin,
PhantomData<Feature>: UnsafeUnpin,
PhantomData<Char>: UnsafeUnpin,
PhantomData<(ImageId, ImageData)>: UnsafeUnpin,
PhantomData<(Painted, Origin)>: UnsafeUnpin,
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