Rastériser
Vue de l’ensemble
‘Rasterizer’ est une classe dans Aspose.Font FOSS pour Python.
Scanline rasterizer pour GlyphPath outlines avec pure Python PNG exportation.
Cette classe fournit 5 méthodes pour travailler avec des objets Rasterizer dans les programmes Python. Les méthodologies disponibles comprennent: __init__, clear , close_contour ; ‘draw_pathetto_png. Tous les membres publics sont accessibles à n'importe quelle application Pythone après l'installation de l’Aspose.Font FOSS pour le package Pyathon. Propriétés : curve_tolerance; height., width` .
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
curve_tolerance | float | Read | Gets the curve tolerance. |
width | `` | Read | Gets the width. |
height | `` | Read | Gets the height. |
méthodes
| Signature | Description |
|---|---|
__init__(width: int, height: int, background: tuple[int, int, int]) | Calls init on this Rasterizer instance. |
| `clear(color: tuple[int, int, int] | None)` |
| `draw_path(path: GlyphPath, color: tuple[int, int, int], transform: tuple[float, …] | None)` |
to_png() → bytes | Encode current RGB buffer as 8-bit PNG (IHDR+IDAT+IEND). |
close_contour() | Finalizes the current contour being rasterized |
Voir aussi
- Aspose.Font — référence API d’entreprise