Class PdfShading
- Namespace
- iText.Kernel.Pdf.Colorspace
- Assembly
- itext.kernel.dll
The abstract PdfShading class that represents the Shading Dictionary PDF object.
public abstract class PdfShading : PdfObjectWrapper<PdfDictionary>
- Inheritance
-
PdfShading
- Derived
- Inherited Members
Constructors
PdfShading(PdfDictionary)
Creates the PdfShading object from the existing PdfDictionary.
protected PdfShading(PdfDictionary pdfObject)
Parameters
pdfObject
PdfDictionaryPdfDictionary from which the PdfShading object will be created.
PdfShading(PdfDictionary, int, PdfColorSpace)
Creates the PdfShading object from the existing PdfDictionary , using provided type and colorspace.
protected PdfShading(PdfDictionary pdfObject, int type, PdfColorSpace colorSpace)
Parameters
pdfObject
PdfDictionaryPdfDictionary from which the PdfShading object will be created.
type
inttype with which this PdfShading object will be created.
colorSpace
PdfColorSpacePdfColorSpace with which this PdfShading object will be created.
Methods
Flush()
To manually flush a
PdfObject
behind this wrapper, you have to ensure
that this object is added to the document, i.e. it has an indirect reference.
public override void Flush()
Remarks
To manually flush a
PdfObject
behind this wrapper, you have to ensure
that this object is added to the document, i.e. it has an indirect reference.
Basically this means that before flushing you need to explicitly call
MakeIndirect(PdfDocument).
For example: wrapperInstance.makeIndirect(document).flush();
Note that not every wrapper require this, only those that have such warning in documentation.
GetColorSpace()
Gets the color space in which colour values shall be expressed.
public virtual PdfObject GetColorSpace()
Returns
GetFunction()
Gets the function PdfObject that represents color transitions across the shading geometry.
public virtual PdfObject GetFunction()
Returns
GetShadingType()
Gets the shading type.
public virtual int GetShadingType()
Returns
- int
int value of ShadingType.
IsWrappedObjectMustBeIndirect()
protected override bool IsWrappedObjectMustBeIndirect()
Returns
MakeShading(PdfDictionary)
Creates the PdfShading object from the existing PdfDictionary with corresponding type.
public static PdfShading MakeShading(PdfDictionary shadingDictionary)
Parameters
shadingDictionary
PdfDictionaryPdfDictionary from which the PdfShading object will be created.
Returns
- PdfShading
Created PdfShading object.
SetFunction(IPdfFunction)
Sets the function that represents color transitions across the shading geometry as one object.
public virtual void SetFunction(IPdfFunction function)
Parameters
function
IPdfFunctionThe IPdfFunction to set.
SetFunction(IPdfFunction[])
Sets the function object that represents color transitions across the shading geometry as an array of functions.
public virtual void SetFunction(IPdfFunction[] functions)
Parameters
functions
IPdfFunction[]The array of IPdfFunction to be set.