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

NameTypeAccessDescription
lut``ReadGets the lut.
extend``ReadGets the extend.
bboxtuple[float, float, float, float] | NoneReadGets the bbox.
backgroundColor | NoneReadGets the background.
color_kind``ReadGets the color kind.

Methods

SignatureDescription
__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)ShadingMethod returns the Shading instance for further sampling via color_at(x, y)
color_at(x: float, y: float)Color | NoneCalls color_at(x, y) on this Shading instance.
pattern_color_at(x: float, y: float)Color | NoneSample a shading pattern, applying its optional background colour.