Class PdfBoxGraphics2DPaintApplier.PaintApplierState

  • Enclosing class:
    PdfBoxGraphics2DPaintApplier

    public static class PdfBoxGraphics2DPaintApplier.PaintApplierState
    extends java.lang.Object
    Internal State of the PaintApplyer. Allows derived classes to change some states.
    • Constructor Detail

      • PaintApplierState

        public PaintApplierState()
    • Method Detail

      • ensureExtendedState

        private void ensureExtendedState()
      • setupLuminosityMasking

        public void setupLuminosityMasking​(java.awt.image.BufferedImage image,
                                           org.apache.pdfbox.pdmodel.common.PDRectangle boundingBox)
                                    throws java.io.IOException
        Setup a mask for the next fill/stroke operation
        Parameters:
        image - the mask image. It will be used to generate a grayscale image, that will directly map to the alpha channel.
        boundingBox - The bounding box of the masking. I.e. where to apply the mask
        Throws:
        java.io.IOException
      • setupLuminosityMasking

        public void setupLuminosityMasking​(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject formXObject)
                                    throws java.io.IOException
        Setup a mask for the next fill/stroke operation. It will use the BBox of the formXObject.
        Parameters:
        formXObject - the mask form. It will be used to generate a grayscale image, that will directly map to the alpha channel.
        Throws:
        java.io.IOException
      • setupLuminosityMasking

        public void setupLuminosityMasking​(org.apache.pdfbox.pdmodel.graphics.PDXObject maskXObject,
                                           org.apache.pdfbox.pdmodel.common.PDRectangle boundingBox)
                                    throws java.io.IOException
        Setup a mask for the next fill/stroke operation.
        Parameters:
        maskXObject - a PDXObject (form or image) which generates a grayscale image for the masking. This image will directly map to the alpha channel.
        boundingBox - The bounding box of the masking. I.e. where to apply the mask
        Throws:
        java.io.IOException