
org.jpedal.external.ImageHandler Maven / Gradle / Ivy
/*
* ===========================================
* Java Pdf Extraction Decoding Access Library
* ===========================================
*
* Project Info: http://www.idrsolutions.com
* Help section for developers at http://www.idrsolutions.com/support/
*
* (C) Copyright 1997-2017 IDRsolutions and Contributors.
*
* This file is part of JPedal/JPDF2HTML5
*
@LICENSE@
*
* ---------------
* ImageHandler.java
* ---------------
*/
package org.jpedal.external;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import org.jpedal.io.ObjectStore;
import org.jpedal.objects.GraphicsState;
import org.jpedal.objects.raw.PdfObject;
@SuppressWarnings("UnusedParameters")
public interface ImageHandler {
//tell JPedal if it ignores its own Image code or not
boolean alwaysIgnoreGenericHandler();
//pass in raw data for image handling - if valid image returned it will be used.
//if alwaysIgnoreGenericHandler() is true JPedal code always ignored. If false, JPedal code used if null
BufferedImage processImageData(GraphicsState gs, PdfObject XObject);
/**
* Indicate that image already scaled so should not be scaled/clipped by JPedal
*/
boolean imageHasBeenScaled();
/**
* Allow user to paint directly onto g2 for screen display
*
* @param image - actual BufferedImage
* @param optionsApplied - any options already done (ie 90 rotate) - values from org.jpedal.constants.PDFImageProcessing
* @param upside_down - AffineTransform applied to page
* @param currentImageFile - name of file stored on disk
* @param g2 - Graphics2D render object
* @param renderDirect -if being rendered straight to g2 (ie bufferedImage)
* @param objectStore - JPedals class to access cached images
* @param isPrinting
* @return true to ignore standard JPedal routines and false to use.
*/
boolean drawImageOnscreen(BufferedImage image, int optionsApplied, AffineTransform upside_down, String currentImageFile, Graphics2D g2, boolean renderDirect, ObjectStore objectStore, boolean isPrinting);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy