Class PDShadingType6

All Implemented Interfaces:
COSObjectable

public class PDShadingType6 extends PDMeshBasedShadingType
Resources for a shading type 6 (Coons Patch Mesh).
  • Constructor Details

    • PDShadingType6

      public PDShadingType6(COSDictionary shadingDictionary)
      Constructor using the given shading dictionary.
      Parameters:
      shadingDictionary - the dictionary for this shading
  • Method Details

    • getShadingType

      public int getShadingType()
      Description copied from class: PDShading
      This will return the shading type.
      Overrides:
      getShadingType in class PDShadingType4
      Returns:
      the shading typ
    • toPaint

      public Paint toPaint(Matrix matrix)
      Description copied from class: PDShading
      Returns an AWT paint which corresponds to this shading
      Overrides:
      toPaint in class PDShadingType4
      Parameters:
      matrix - the pattern matrix concatenated with that of the parent content stream, this matrix which maps the pattern's internal coordinate system to user space
      Returns:
      an AWT Paint instance
    • generatePatch

      protected Patch generatePatch(Point2D[] points, float[][] color)
      Description copied from class: PDMeshBasedShadingType
      Create a patch using control points and 4 corner color values, in Type6ShadingContext, a CoonsPatch is returned; in Type6ShadingContext, a TensorPatch is returned.
      Specified by:
      generatePatch in class PDMeshBasedShadingType
      Parameters:
      points - 12 or 16 control points
      color - 4 corner colors
      Returns:
      a patch instance
    • getBounds

      public Rectangle2D getBounds(AffineTransform xform, Matrix matrix) throws IOException
      Description copied from class: PDShading
      Calculate a bounding rectangle around the areas of this shading context.
      Specified by:
      getBounds in class PDMeshBasedShadingType
      Returns:
      Bounding rectangle or null, if not supported by this shading type.
      Throws:
      IOException