iText 7 7.1.8 API
iText.Kernel.Pdf.Colorspace.PdfShading Class Reference

The abstract PdfShading class that represents the Shading Dictionary PDF object. More...

Inheritance diagram for iText.Kernel.Pdf.Colorspace.PdfShading:
iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary > iText.Kernel.Pdf.Colorspace.PdfShading.Axial iText.Kernel.Pdf.Colorspace.PdfShading.CoonsPatchMesh iText.Kernel.Pdf.Colorspace.PdfShading.FreeFormGouraudShadedTriangleMesh iText.Kernel.Pdf.Colorspace.PdfShading.FunctionBased iText.Kernel.Pdf.Colorspace.PdfShading.LatticeFormGouraudShadedTriangleMesh iText.Kernel.Pdf.Colorspace.PdfShading.Radial iText.Kernel.Pdf.Colorspace.PdfShading.TensorProductPatchMesh

Classes

class   Axial
  The class that extends PdfShading class and is in charge of Shading Dictionary with axial type, that define a colour blend that varies along a linear axis between two endpoints and extends indefinitely perpendicular to that axis. More...
 
class   CoonsPatchMesh
  The class that extends PdfShading class and is in charge of Shading Dictionary with Coons Patch mesh type. This type of shading is constructed from one or more colour patches, each bounded by four cubic Bézier curves. Degenerate Bézier curves are allowed and are useful for certain graphical effects. At least one complete patch shall be specified. The shape of patch is defined by 12 control points. Colours are specified for each corner of the unit square, and bilinear interpolation is used to fill in colours over the entire unit square. Coordinates are mapped from the unit square into a four-sided patch whose sides are not necessarily linear. The mapping is continuous: the corners of the unit square map to corners of the patch and the sides of the unit square map to sides of the patch. For the format of data stream, that defines patches (see ISO-320001 Table 85). If the shading dictionary contains a Function entry, the colour data for each corner of a patch shall be specified by a single parametric value t rather than by n separate colour components c1...cn. More...
 
class   FreeFormGouraudShadedTriangleMesh
  The class that extends PdfShading class and is in charge of Shading Dictionary with free-form Gouraud-shaded triangle mesh type. The area to be shaded is defined by a path composed entirely of triangles. The colour at each vertex of the triangles is specified, and a technique known as Gouraud interpolation is used to colour the interiors. The object shall be represented as stream containing a sequence of vertex data. Each vertex is specified by the following values, in the order shown: f x y c1 ... cn where: f - the vertex's edge flag, that determines the vertex is connected to other vertices of the triangle mesh. For full description, see ISO-320001 Paragraph 8.7.4.5.5 x, y - vertex's horizontal and vertical coordinates, expressed in the shading's target coordinate space. c1...cn - vertex's colour components. If the shading dictionary includes a Function entry, only a single parametric value, t, shall be specified for each vertex in place of the colour components c1...cn. More...
 
class   FunctionBased
  The class that extends PdfShading class and is in charge of Shading Dictionary with function-based type, that defines color at every point in the domain by a specified mathematical function. More...
 
class   LatticeFormGouraudShadedTriangleMesh
  The class that extends PdfShading class and is in charge of Shading Dictionary with lattice-form Gouraud-shaded triangle mesh type. This type is similar to FreeFormGouraudShadedTriangleMesh but instead of using free-form geometry, the vertices are arranged in a pseudorectangular lattice, which is topologically equivalent to a rectangular grid. The vertices are organized into rows, which need not be geometrically linear. The verticals data in stream is similar to FreeFormGouraudShadedTriangleMesh , except there is no edge flag. More...
 
class   Radial
  The class that extends PdfShading class and is in charge of Shading Dictionary with radial type, that define a colour blend that varies between two circles. This type of shading shall not be used with an Indexed colour space More...
 
class   TensorProductPatchMesh
  The class that extends PdfShading class and is in charge of Shading Dictionary with Tensor-Product Patch mesh type. This type of shading is identical to CoonsPatchMesh , except that it's based on a bicubic tensor-product patch defined by 16 control points. For the format of data stream, that defines patches, see ISO-320001 Table 86. More...
 

Public Member Functions

virtual int  GetShadingType ()
  Gets the shading type. More...
 
virtual PdfObject  GetColorSpace ()
  Gets the color space in which colour values shall be expressed. More...
 
virtual PdfObject  GetFunction ()
  Gets the function PdfObject that represents color transitions across the shading geometry. More...
 
virtual void  SetFunction (PdfFunction function)
  Sets the function that represents color transitions across the shading geometry as one object. More...
 
virtual void  SetFunction (PdfFunction[] functions)
  Sets the function object that represents color transitions across the shading geometry as an array of functions. More...
 
override void  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. Basically this means that before flushing you need to explicitly call iText.Kernel.Pdf.PdfObjectWrapper.MakeIndirect(iText.Kernel.Pdf.PdfDocument)For example: wrapperInstance.makeIndirect(document).flush(); Note that not every wrapper require this, only those that have such warning in documentation. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >
virtual T  GetPdfObject ()
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document, PdfIndirectReference reference)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  SetModified ()
 
virtual bool  IsFlushed ()
 

Static Public Member Functions

static PdfShading  MakeShading (PdfDictionary shadingDictionary)
  Creates the PdfShading object from the existing iText.Kernel.Pdf.PdfDictionary with corresponding type. More...
 

Detailed Description

The abstract PdfShading class that represents the Shading Dictionary PDF object.

Member Function Documentation

◆ Flush()

override void iText.Kernel.Pdf.Colorspace.PdfShading.Flush ( )
inlinevirtual

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 iText.Kernel.Pdf.PdfObjectWrapper.MakeIndirect(iText.Kernel.Pdf.PdfDocument)For example: wrapperInstance.makeIndirect(document).flush(); Note that not every wrapper require this, only those that have such warning in documentation.

Reimplemented from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >.

◆ GetColorSpace()

virtual PdfObject iText.Kernel.Pdf.Colorspace.PdfShading.GetColorSpace ( )
inlinevirtual

Gets the color space in which colour values shall be expressed.

Returns

iText.Kernel.Pdf.PdfObject Color space

◆ GetFunction()

virtual PdfObject iText.Kernel.Pdf.Colorspace.PdfShading.GetFunction ( )
inlinevirtual

Gets the function PdfObject that represents color transitions across the shading geometry.

Returns

iText.Kernel.Pdf.PdfObject Function

◆ GetShadingType()

virtual int iText.Kernel.Pdf.Colorspace.PdfShading.GetShadingType ( )
inlinevirtual

Gets the shading type.

Returns
int value of iText.Kernel.Pdf.PdfName.ShadingType

◆ MakeShading()

static PdfShading iText.Kernel.Pdf.Colorspace.PdfShading.MakeShading ( PdfDictionary  shadingDictionary )
inlinestatic

Creates the PdfShading object from the existing iText.Kernel.Pdf.PdfDictionary with corresponding type.

Parameters
shadingDictionary

iText.Kernel.Pdf.PdfDictionary from which the PdfShading object will be created.

Returns
Created PdfShading object.

◆ SetFunction() [1/2]

virtual void iText.Kernel.Pdf.Colorspace.PdfShading.SetFunction ( PdfFunction  function )
inlinevirtual

Sets the function that represents color transitions across the shading geometry as one object.

Parameters
function The iText.Kernel.Pdf.Function.PdfFunction to set.

◆ SetFunction() [2/2]

virtual void iText.Kernel.Pdf.Colorspace.PdfShading.SetFunction ( PdfFunction[]  functions )
inlinevirtual

Sets the function object that represents color transitions across the shading geometry as an array of functions.

Parameters
functions The array of iText.Kernel.Pdf.Function.PdfFunction to be set.