Class PatchMeshesShadingContext

  • All Implemented Interfaces:
    java.awt.PaintContext
    Direct Known Subclasses:
    Type6ShadingContext, Type7ShadingContext

    abstract class PatchMeshesShadingContext
    extends TriangleBasedShadingContext
    This class is extended in Type6ShadingContext and Type7ShadingContext. This was done as part of GSoC2014, Tilman Hausherr is the mentor.
    • Field Detail

      • patchList

        private java.util.List<Patch> patchList
        patch list
    • Constructor Detail

      • PatchMeshesShadingContext

        protected PatchMeshesShadingContext​(PDMeshBasedShadingType shading,
                                            java.awt.image.ColorModel colorModel,
                                            java.awt.geom.AffineTransform xform,
                                            Matrix matrix,
                                            java.awt.Rectangle deviceBounds,
                                            int controlPoints)
                                     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
        controlPoints - number of control points, 12 for type 6 shading and 16 for type 7 shading
        Throws:
        java.io.IOException - if something went wrong
    • Method Detail

      • calcPixelTable

        protected java.util.Map<java.awt.Point,​java.lang.Integer> calcPixelTable​(java.awt.Rectangle deviceBounds)
                                                                                throws java.io.IOException
        Description copied from class: TriangleBasedShadingContext
        Calculate every point and its color and store them in a Hash table.
        Specified by:
        calcPixelTable in class TriangleBasedShadingContext
        Returns:
        a Hash table which contains all the points' positions and colors of one image
        Throws:
        java.io.IOException