public class PDFShading extends PDFObject
| Modifier and Type | Field and Description |
|---|---|
protected String |
shadingName
The name of the Shading e.g.
|
| Constructor and Description |
|---|
PDFShading(int shadingType,
PDFDeviceColorSpace colorSpace,
List coords,
PDFFunction pdfFunction)
Constructor for Type 2 and 3
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
contentEquals(PDFObject obj)
Check if the other PDFObject has the same content as the current object.
|
String |
getName()
Get the name of this shading.
|
void |
setName(String name)
Sets the name of the shading
|
String |
toPDFString()
represent as PDF.
|
encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getChildren, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDFprotected String shadingName
public PDFShading(int shadingType,
PDFDeviceColorSpace colorSpace,
List coords,
PDFFunction pdfFunction)
shadingType - 2 or 3 for axial or radial shadingcolorSpace - "DeviceRGB" or similar.coords - List of four (type 2) or 6 (type 3) DoublepdfFunction - the Stitching (PDFfunction type 3) function,
even if it's stitching a single functionpublic String getName()
public void setName(String name)
name - the name of the shading pattern. Can be anything
without spaces. "Shading1" or "Sh1" are good examples.public String toPDFString()
toPDFString in class PDFObjectprotected boolean contentEquals(PDFObject obj)
Note: This function has a contract which is less binding than
Object.equals(Object). Whereas equals would require all values to be
identical, this method is not required to check everything. In the case
of PDFObjects, this means that the overriding function does not have to
check for PDFObject.getObjectID().
contentEquals in class PDFObjectobj - object to compare to.Copyright © 2023 Apache Software Foundation. All rights reserved.