Rasterizer
Overview
Rasterizer is a class in Aspose.Font FOSS for Python.
Scanline rasterizer for GlyphPath outlines with pure-Python PNG export.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
curve_tolerance | float | Read | |
width | `` | Read | |
height | `` | Read |
Methods
| Signature | Description |
|---|---|
__init__(width: int, height: int, background: tuple[int, int, int]) | |
clear(color: tuple[int, int, int] | None) | Fill entire buffer with background (or provided) color. |
draw_path(path: GlyphPath, color: tuple[int, int, int], transform: tuple[float, ...] | None) | Rasterize one path into the current RGB buffer. |
to_png() → bytes | Encode current RGB buffer as 8-bit PNG (IHDR+IDAT+IEND). |
close_contour() |