RasterSurface
Overzicht
RasterSurface is een klasse in Aspose.Page FOSS voor Python.
In-memory RGBA-pixeloppervlak.
Deze klasse biedt 3 methoden voor het werken met RasterSurface objecten in Python programma’s. Beschikbare methoden zijn: create, get_pixel, set_pixel. Alle openbare leden zijn toegankelijk voor elke Python applicatie na het installeren van het Aspose.Page FOSS voor Python pakket. Eigenschappen: clip_mask, height, pixels, width.
Eigenschappen
| Naam | Type | Toegang | Beschrijving |
|---|---|---|---|
width | int | Lezen/schrijven | Haalt de breedte op of stelt deze in. |
height | int | Lezen/schrijven | Haalt of stelt de hoogte in. |
pixels | bytearray | Lezen/schrijven | Haalt de pixels op of stelt ze in. |
clip_mask | `bytearray | None` | Lezen/schrijven |
Methoden
| Handtekening | Beschrijving |
|---|---|
create(width: int, height: int, background: tuple[int, int, int, int]) → "RasterSurface" | |
set_pixel(x: int, y: int, color: tuple[int, int, int, int]) | Stelt de pixelwaarde in. |
get_pixel(x: int, y: int) → tuple[int, int, int, int] |