SoftwareRasterizer Class

Definition

Annotations in the software rasterizer: NoZoom and NoRotate placement, and the appearance group's opacity and blend mode.

public sealed class SoftwareRasterizer : IDisposable

Remarks

It consumes display lists only, replaying them through its own IRenderingBackend. Paths are mapped to device space, curves flattened to within a tenth of a pixel (ISO 32000-2 §10.7.2 lets a processor choose its flatness), open subpaths closed, a trailing lone moveto ignored and a degenerate subpath given the pixel under it (§8.5.3.3.1), then scan converted with the non-zero winding or even-odd rule (§8.5.3.3.2, §8.5.3.3.3, §10.7.4; see the remarks on coverage there). Colours convert to RGB through GetColorConverter(PdfColorSpace, ColorConversion, PdfDefaultColorSpaces?), so the engine's colour management (IColorManagement) decides them (§8.6, §10).

Clipping (§8.5.4): the clip starts as the rendered page area and is intersected with each clipping path the list hands over, saved and restored with the graphics state; a form is clipped to its bounding box (§8.10.1). Clips are anti-aliased: a rectangle that stays aligned with the pixel axes only narrows a clip rectangle (no mask), any other path becomes a pooled coverage mask. Every paint's coverage is multiplied by the clip's.

Tiles and regions (spec #33 story 14): Region, or a cached DisplayList rendered with Render(DisplayList, Bitmap, in Matrix) under the page's device transform moved by a tile's offset, draws only the paints whose bounds reach the bitmap. A tile has the pixels of the whole render at the same place: exactly where the arithmetic is exact, and otherwise within one level at a pixel whose coverage sits on a rounding boundary.

Reuse one instance for many renders: its working buffers are pooled and kept, so a warm render allocates nothing per path, cell or scanline. An instance renders one page at a time; use one per thread to render in parallel (a document is safe for concurrent renders while nobody changes it).

Viewer capability 2 (issue #97): a page render takes a cancellation token and a progress receiver from its RenderOptions, and BeginRender(PdfPage, Bitmap, RenderOptions) draws in time slices that resume where they stopped (ProgressiveRender), for hosts that must not block.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Properties (2)

Methods (9)