Class ExampleImageDrawOnScreenHandler

  • All Implemented Interfaces:
    org.jpedal.external.ImageHandler

    public class ExampleImageDrawOnScreenHandler
    extends Object
    implements org.jpedal.external.ImageHandler
    example code to plugin external image handler. Code to enable commented out in Viewer
    • Constructor Detail

      • ExampleImageDrawOnScreenHandler

        public ExampleImageDrawOnScreenHandler()
    • Method Detail

      • alwaysIgnoreGenericHandler

        public boolean alwaysIgnoreGenericHandler()
        Specified by:
        alwaysIgnoreGenericHandler in interface org.jpedal.external.ImageHandler
      • processImageData

        public BufferedImage processImageData​(org.jpedal.objects.GraphicsState gs,
                                              org.jpedal.objects.raw.PdfObject XObject)
        Specified by:
        processImageData in interface org.jpedal.external.ImageHandler
      • imageHasBeenScaled

        public boolean imageHasBeenScaled()
        Description copied from interface: org.jpedal.external.ImageHandler
        Indicate that image already scaled so should not be scaled/clipped by JPedal
        Specified by:
        imageHasBeenScaled in interface org.jpedal.external.ImageHandler
      • drawImageOnscreen

        public boolean drawImageOnscreen​(BufferedImage image,
                                         int optionsApplied,
                                         AffineTransform upside_down,
                                         String currentImageFile,
                                         Graphics2D g2,
                                         boolean renderDirect,
                                         org.jpedal.io.ObjectStore objectStoreRef,
                                         boolean isPrinting)
        Description copied from interface: org.jpedal.external.ImageHandler
        Allow user to paint directly onto g2 for screen display
        Specified by:
        drawImageOnscreen in interface org.jpedal.external.ImageHandler
        Parameters:
        image - - actual BufferedImage
        optionsApplied - - any options already done (ie 90 rotate) - values from org.jpedal.constants.PDFImageProcessing
        upside_down - - AffineTransform applied to page
        currentImageFile - - name of file stored on disk
        g2 - - Graphics2D render object
        renderDirect - -if being rendered straight to g2 (ie bufferedImage)
        objectStoreRef - - JPedals class to access cached images
        Returns:
        true to ignore standard JPedal routines and false to use.