Crate vello_common

Source
Expand description

This crate includes common geometry representations, tiling logic, and other fundamental components used by both Vello CPU and Vello Hybrid.

§Usage

This crate should not be used on its own, and you should instead use one of the renderers which use it. At the moment, only Vello CPU is published, and you probably want to use that.

We also develop Vello, which makes use of the GPU for 2D rendering and has higher performance than Vello CPU. Vello CPU is being developed as part of work to address shortcomings in Vello. Vello does not use this crate.

§Features

  • std (enabled by default): Get floating point functions from the standard library (likely using your target’s libc).
  • libm: Use floating point implementations from libm.
  • png (enabled by default): Allow loading Pixmaps from PNG images. Also required for rendering glyphs with an embedded PNG. Implies std.
  • simd: Allows requesting SIMD execution modes. Note that SIMD is not yet implemented.

At least one of std and libm is required; std overrides libm.

§Contents

  • Shared data structures for paths, tiles, and strips
  • Geometry processing utilities
  • Common logic for rendering stages

This crate acts as a foundation for vello_cpu and vello_hybrid, providing essential components to minimize duplication.

Re-exports§

pub use peniko;
pub use peniko::color;
pub use peniko::kurbo;

Modules§

blurred_rounded_rect
Blurred, rounded rectangles.
coarse
Generating and processing wide tiles.
colr
Drawing COLR glyphs.
encode
Paints for drawing shapes.
execute
Different execution modes for kernels.
flatten
Flattening filled and stroked paths.
glyph
Processing and drawing glyphs.
mask
Alpha and luminance masks.
math
Mathematical helper functions.
paint
Types for paints.
pixmap
A simple pixmap type.
strip
Rendering strips.
tile
Primitives for creating tiles.