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

NameTypeAccessDescription
curve_tolerancefloatReadGets the curve tolerance.
width``ReadGets the width.
height``ReadGets the height.

méthodes

SignatureDescription
__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()bytesEncode 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
 Français