pub struct TinySkiaBackend;Expand description
CPU rasterization backend backed by the tiny-skia library.
Determinism guarantees:
- Anti-aliasing is disabled for rect fills → integer-aligned rects produce exact, reproducible pixels with no sub-pixel variance.
- Anti-aliasing is enabled for glyph fills — glyph edges are curved and require AA for legible output. tiny-skia AA is pure-software and deterministic on the same machine (no GPU, no random numbers).
- No
HashMap, no random numbers, no timestamps. - PNG encoding via
tiny_skia::Pixmap::encode_pngwrites no timestamps.
Trait Implementations§
Source§impl RasterBackend for TinySkiaBackend
impl RasterBackend for TinySkiaBackend
Source§fn rasterize(
&self,
scene: &Scene,
fonts: &dyn FontProvider,
assets: &dyn AssetProvider,
) -> Result<RasterImage, RenderError>
fn rasterize( &self, scene: &Scene, fonts: &dyn FontProvider, assets: &dyn AssetProvider, ) -> Result<RasterImage, RenderError>
Rasterize a scene to straight-alpha RGBA8 pixels plus dimensions. Read more
Source§fn encode_png(&self, image: &RasterImage) -> Result<Vec<u8>, RenderError>
fn encode_png(&self, image: &RasterImage) -> Result<Vec<u8>, RenderError>
Encode a
RasterImage as deterministic PNG bytes.Auto Trait Implementations§
impl Freeze for TinySkiaBackend
impl RefUnwindSafe for TinySkiaBackend
impl Send for TinySkiaBackend
impl Sync for TinySkiaBackend
impl Unpin for TinySkiaBackend
impl UnsafeUnpin for TinySkiaBackend
impl UnwindSafe for TinySkiaBackend
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
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>
Converts
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>
Converts
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> Pointable for T
impl<T> Pointable for T
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.