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).

This class provides 17 methods for working with AxialShading objects in Java programs. Available methods include: AxialShading, getBBox, getBackground, getColorAt, getColorSpace, getPdfDictionary, getShadingType, getT0, getT1, getX0, getX1, getY0, and 5 additional methods. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: antiAlias, bBox, background, colorSpace, extendEnd, extendStart, and 8 more.

Properties

NameTypeAccessDescription
shadingTypeintReadGets the shading type.
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.
pdfDictionaryPdfDictionaryReadReturns the underlying dictionary.

Methods

SignatureDescription
AxialShading(dict: PdfDictionary, parser: PDFParser)Creates an AxialShading from its dictionary.
getShadingType()intReturns the shading type.
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.
getPdfDictionary()PdfDictionaryReturns the underlying dictionary.
parse(obj: PdfBase, parser: PDFParser)ShadingFactory: parses a shading from a PDF object.

See Also

 English