Class Type6ShadingContext

  • All Implemented Interfaces:
    java.awt.PaintContext

    class Type6ShadingContext
    extends PatchMeshesShadingContext
    AWT PaintContext for coons patch meshes (type 6) shading. This was done as part of GSoC2014, Tilman Hausherr is the mentor.
    • Constructor Detail

      • Type6ShadingContext

        Type6ShadingContext​(PDShadingType6 shading,
                            java.awt.image.ColorModel colorModel,
                            java.awt.geom.AffineTransform xform,
                            Matrix matrix,
                            java.awt.Rectangle deviceBounds)
                     throws java.io.IOException
        Constructor creates an instance to be used for fill operations.
        Parameters:
        shading - the shading type to be used
        colorModel - the color model to be used
        xform - transformation for user to device space
        matrix - the pattern matrix concatenated with that of the parent content stream
        deviceBounds - device bounds
        Throws:
        java.io.IOException - if something went wrong
    • Method Detail

      • generatePatch

        protected Patch generatePatch​(java.awt.geom.Point2D[] points,
                                      float[][] color)
        Description copied from class: PatchMeshesShadingContext
        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 PatchMeshesShadingContext
        Parameters:
        points - 12 or 16 control points
        color - 4 corner colors
        Returns:
        a patch instance