Rasterizer
Overview
Rasterizer เป็นคลาสใน Aspose.Font FOSS สําหรับ Python.
การสแกนไลน์ rasterizer สําหรับ GlyphPath รูปแบบที่มีการส่งออก PNG ของ Python ธรรมดา.
หมวดนี้ให้ 5 วิธีในการทํางานกับวัตถุ Rasterizer ในโปรแกรม Python. วิธีการที่ใช้ได้แก่: __init__, clear, close_contour, draw_path, to_png. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน Python ใดก็ได้หลังจากติดตั้งแพ็คเกจ FOSS for Python. คุณสมบัติ: curve_tolerance, height, width.
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]) | Calls init การประกอบการ ในตัวอย่างของราสเตอร์ไซเซอร์นี้. |
| `clear(color: tuple[int, int, int] | None)` |
| `draw_path(path: GlyphPath, color: tuple[int, int, int], transform: tuple[float, …] | None)` |
to_png() → bytes | การรหัส RGB เบฟเฟอร์ปัจจุบันเป็น PNG 8 บิต (IHDR+IDAT + IEND). |
close_contour() | จบการเรสเตอร์ตัวปริมาณของตอนนี้ |