Shading
Overview
Shading is a class in Aspose.PDF FOSS for Python.
Base class for bounded RGB sampling in a shading’s target space.
This class declares 4 methods for Shading objects in Python programs.
Available methods include: __init__, color_at, configure, pattern_color_at.
All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Properties: background, bbox, color_kind, extend, lut.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
lut | `` | Read | Gets the lut. |
extend | `` | Read | Gets the extend. |
bbox | tuple[float, float, float, float] | None | Read | Gets the bbox. |
background | Color | None | Read | Gets the background. |
color_kind | `` | Read | Gets the color kind. |
Methods
| Signature | Description |
|---|---|
__init__(lut: list[Color], extend: list[bool]) | Calls init(lut, extend) on this Shading instance. |
configure(bbox: tuple[float, float, float, float] | None, background: Color | None, color_kind: str) → Shading | Method returns the Shading instance for further sampling via color_at(x, y) |
color_at(x: float, y: float) → Color | None | Calls color_at(x, y) on this Shading instance. |
pattern_color_at(x: float, y: float) → Color | None | Sample a shading pattern, applying its optional background colour. |