Skip to main content

Module blend

Module blend 

Source
Expand description

The sixteen PDF blend modes (ISO 32000-1 §11.3.5), computed the way the oracle does: all-integer, truncating, unclamped.

Part of the backend seam. A backend that writes its own pixels composites with composite_solid and composite_premultiplied rather than with its rasterizer library’s, which rounds differently.

These are the engine’s blend functions, used where the engine composites its own offscreen buffers; on-device compositing goes through each rasterizer’s native blend modes, which round differently by ±1. Where a value is a decision rather than rasterization it comes from here, so every backend sees the same bytes.

Functions§

composite_premultiplied
Composite one premultiplied RGBA8 source pixel over a premultiplied destination pixel, blending with mode and scaling the source by coverage.
composite_solid
Composite a straight RGBA8 source pixel over a premultiplied destination pixel, blending with mode and scaling the source by coverage.