AxialShadingPattern Class Documentation
classAxialShadingPattern : ShadingPatternNamespace:com::datalogics::PDFL
- Inherits from:
ShadingPattern
Detailed Description
A color blend that varies along an axis. An axial shading specifies a color blend that varies along a linear axis between two endpoints, and indefinitely perpendicular to that axis.
Constructor & Destructor Documentation
AxialShadingPattern
AxialShadingPattern(ColorSpacecolorSpace, java.util.List< Point >coords, java.util.List< Function >function)Parameters
colorSpace: ColorSpaceThe color space for the pattern.
coords: java.util.List< Point >The coordinates of the two endpoints of the axial shading.
function: java.util.List< Function >One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels.
Create an AxialShadingPattern.
Member Function Documentation
DisposeChildren
voidDisposeChildren()Returns:
void[static initializer]
static void[static initializer]()delete
synchronized voiddelete(Booleandisposing)Parameters
disposing: Boolean
Returns:
synchronized voiddelete
synchronized voiddelete()Returns:
synchronized voidfinalize
voidfinalize()Returns:
voidgetAntiAlias
booleangetAntiAlias()Returns:
true if anti-aliasing is enabled, false otherwise.Gets whether anti-aliasing is enabled for the shading. When enabled, the shading function is filtered to prevent aliasing artifacts.
getBackgroundColor
ColorgetBackgroundColor()Returns:
The background Color, or NULL if none is set.Gets the background color of the shading pattern. This color must be in the color space of the shading pattern. If present, it is used to fill the areas that are outside the bounds of the shading object. May be NULL.
getBoundingBox
RectgetBoundingBox()Returns:
The bounding box Rect, or NULL if none is set.Gets the bounding box of the shading. The coordinates are interpreted in the target coordinate space. If present, provides an additional, temporary clipping boundary to the shading.
getColorSpace
ColorSpacegetColorSpace()Returns:
The ColorSpace of the shading pattern.Gets the color space of a shading pattern. This space is restricted to be any space except a Pattern space.
getCoords
java.util.List< Point >getCoords()Returns:
A list of two Point objects defining the start and end of the axis.The coordinates of the two endpoints of the axial shading.
getDomain
java.util.List< Double >getDomain()Returns:
A list of two doubles, or null if not set.The domain of the parametric variable t for the axial shading. An array of two numbers that specify the limiting values of the parametric variable t. This variable t varies linearly between these two values as the gradient varies between the starting and ending points of the axis.
Defaults to [0, 1]. May be NULL.
getExtend
java.util.List< Boolean >getExtend()Returns:
A list of two booleans, or null if not set.Whether the shading extends beyond the start and end points of the axis. An array of two boolean values indicating whether to extend the shading beyond the starting and ending points of the axis, respectively.
Default value: [false, false]. May be NULL.
getFunction
java.util.List< Function >getFunction()Returns:
A list of Function objects used to compute color values.The function(s) that determine the color channel values for the shading. One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels, where n is the number of color components in the shading's color space. The functions are called with a parametric variable t which varies across the Domain.
getPDFObject
PDFObjectgetPDFObject()Returns:
The PDFObject representing this pattern in the PDF document.Gets the underlying PDF object for this pattern.
setAntiAlias
voidsetAntiAlias(booleanantiAlias)Parameters
antiAlias: booleantrue to enable anti-aliasing, false to disable it.
Returns:
voidSets whether anti-aliasing is enabled for the shading. When enabled, the shading function is filtered to prevent aliasing artifacts.
setBackgroundColor
voidsetBackgroundColor(Colorcolor)Parameters
color: ColorThe background Color to set, or NULL to remove it.
Returns:
voidSets the background color of the shading pattern. This color must be in the color space of the shading pattern. If present, it is used to fill the areas that are outside the bounds of the shading object. Set to NULL to remove the background color.
setBoundingBox
voidsetBoundingBox(RectboundingBox)Parameters
boundingBox: RectThe bounding box Rect to set, or NULL to remove it.
Returns:
voidSets the bounding box of the shading. The coordinates are interpreted in the target coordinate space. If present, provides an additional, temporary clipping boundary to the shading. Set to NULL to remove the bounding box.
setColorSpace
voidsetColorSpace(ColorSpacecolorSpace)Parameters
colorSpace: ColorSpaceThe ColorSpace to set for the shading pattern.
Returns:
voidSets the color space of a shading pattern. This space is restricted to be any space except a Pattern space.
setCoords
voidsetCoords(java.util.List< Point >coords)Parameters
coords: java.util.List< Point >A list of exactly two Point objects defining the start and end of the axis.
Returns:
voidSet the coordinates of the two endpoints of the axial shading.
setDomain
voidsetDomain(java.util.List< Double >domain)Parameters
domain: java.util.List< Double >A list of exactly two doubles, or null to remove.
Returns:
voidSet the domain of the parametric variable t for the axial shading. An array of two numbers that specify the limiting values of the parametric variable t. This variable t varies linearly between these two values as the gradient varies between the starting and ending points of the axis.
Default value: [0, 1]. Pass NULL to remove the domain entry.
setExtend
voidsetExtend(java.util.List< Boolean >extend)Parameters
extend: java.util.List< Boolean >A list of exactly two booleans, or null to remove.
Returns:
voidSet whether the shading extends beyond the start and end points of the axis. An array of two boolean values indicating whether to extend the shading beyond the starting and ending points of the axis, respectively.
Default value: [false, false]. Pass NULL to remove the extend entry.
setFunction
voidsetFunction(java.util.List< Function >function)Parameters
function: java.util.List< Function >A list of one or more Function objects. Must contain at least one function.
Returns:
voidSet the function(s) that determine the color channel values for the shading. One 1-in n-out function, or an array of n 1-in 1-out functions that determine the values of the color channels, where n is the number of color components in the shading's color space. The functions are called with a parametric variable t which varies across the Domain.
toString
StringtoString()Returns:
A formatted string describing this AxialShadingPattern.Return a string representation of the AxialShadingPattern. The string includes the color space, background color, bounding box, anti-alias flag, coordinates, function, domain, and extend values.