Package com.orsonpdf.shading
Class Shading
- java.lang.Object
-
- com.orsonpdf.PDFObject
-
- com.orsonpdf.shading.Shading
-
- Direct Known Subclasses:
AxialShading,RadialShading
public abstract class Shading extends PDFObject
A PDF shading object (this class is abstract, subclasses implement particular shading types).
-
-
Field Summary
Fields Modifier and Type Field Description protected DictionarydictionaryThe dictionary.private ShadingTypeshadingTypeThe shading type.
-
Constructor Summary
Constructors Modifier Constructor Description protectedShading(int number, ShadingType shadingType)Creates a new shading instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getObjectBytes()Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.ShadingTypegetShadingType()Returns the shading type.-
Methods inherited from class com.orsonpdf.PDFObject
getGeneration, getNumber, getReference, toPDFBytes
-
-
-
-
Field Detail
-
shadingType
private ShadingType shadingType
The shading type.
-
dictionary
protected Dictionary dictionary
The dictionary.
-
-
Constructor Detail
-
Shading
protected Shading(int number, ShadingType shadingType)Creates a new shading instance.- Parameters:
number- the PDF object number.shadingType- the shading type (nullnot permitted).
-
-
Method Detail
-
getShadingType
public ShadingType getShadingType()
Returns the shading type.- Returns:
- The shading type (never
null).
-
getObjectBytes
public byte[] getObjectBytes()
Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.- Specified by:
getObjectBytesin classPDFObject- Returns:
- A byte array.
-
-