AxialShading

Overview

AxialShading is a class in Aspose.Pdf FOSS for Java. Inherits from: Shading.

Axial shading / linear gradient — ShadingType 2 (ISO 32000-1:2008, §8.7.4.5.2).

Properties

NameTypeAccessDescription
shadingTypeintRead
x0doubleReadReturns the start point X coordinate.
y0doubleReadReturns the start point Y coordinate.
x1doubleReadReturns the end point X coordinate.
y1doubleReadReturns the end point Y coordinate.
t0doubleReadReturns the start of the parametric domain.
t1doubleReadReturns the end of the parametric domain.
extendStartbooleanReadReturns whether the gradient extends before the start point.
extendEndbooleanReadReturns whether the gradient extends past the end point.
colorSpaceColorSpaceBaseReadReturns the color space.
backgrounddouble[]ReadReturns the optional background color, or {@code null}.
bBoxRectangleReadReturns the optional bounding box, or {@code null}.
antiAliasbooleanReadReturns whether anti-aliasing is requested.
cOSDictionaryCOSDictionaryReadReturns the underlying dictionary.

Methods

SignatureDescription
AxialShading(dict: COSDictionary, parser: PDFParser)Creates an AxialShading from its dictionary.
getShadingType()int
getColorAt(x: double, y: double)double[]
getX0()doubleReturns the start point X coordinate.
getY0()doubleReturns the start point Y coordinate.
getX1()doubleReturns the end point X coordinate.
getY1()doubleReturns the end point Y coordinate.
getT0()doubleReturns the start of the parametric domain.
getT1()doubleReturns the end of the parametric domain.
isExtendStart()booleanReturns whether the gradient extends before the start point.
isExtendEnd()booleanReturns whether the gradient extends past the end point.
getColorSpace()ColorSpaceBaseReturns the color space.
getBackground()double[]Returns the optional background color, or {@code null}.
getBBox()RectangleReturns the optional bounding box, or {@code null}.
isAntiAlias()booleanReturns whether anti-aliasing is requested.
getCOSDictionary()COSDictionaryReturns the underlying dictionary.
parse(obj: COSBase, parser: PDFParser)ShadingFactory: parses a shading from a COS object.

See Also