You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by es...@locus.apache.org on 2000/05/23 11:05:09 UTC

cvs commit: xml-fop/src/org/apache/fop/image FopImage.java

eschaeffer    00/05/23 02:05:08

  Modified:    src/org/apache/fop/image FopImage.java
  Log:
  new FopImage interface
  
  Revision  Changes    Path
  1.6       +51 -20    xml-fop/src/org/apache/fop/image/FopImage.java
  
  Index: FopImage.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/FopImage.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FopImage.java	1999/11/22 02:31:43	1.5
  +++ FopImage.java	2000/05/23 09:05:07	1.6
  @@ -1,4 +1,4 @@
  -/*-- $Id: FopImage.java,v 1.5 1999/11/22 02:31:43 jtauber Exp $ -- 
  +/*-- $Id: FopImage.java,v 1.6 2000/05/23 09:05:07 eschaeffer Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -48,27 +48,58 @@
    Software Foundation, please see <http://www.apache.org/>.
    
    */
  -/* modified by JKT to integrate into 0.12.0 */
  +//Author:       Eric SCHAEFFER
  +//Description:  represent an image object
   
  -//Title:        BoBoGi FOP
  -//Version:      
  -//Copyright:    Copyright (c) 1999
  -//Author:       Sergio Botti
  -//Company:      Dibe Elsag
  -//Description:  Part in xml to pdf converter
  -
  -
   package org.apache.fop.image;
   
  +import org.apache.fop.datatypes.ColorSpace;
  +import org.apache.fop.pdf.PDFColor;
  +import org.apache.fop.pdf.PDFFilter;
  +
   public interface FopImage {
  -  public int getpixelwidth();
  -  public int getpixelheight();
  -  public int getWidth();
  -  public int getHeight();
  -  public int getX();
  -  public int getY();
  -  public String gethref();
  -  public int[] getimagemap();
  -  public boolean getcolor();
  -  public int getbitperpixel();
  +	// Init the object.
  +	// If href protocol isn't file://, can load the entire image
  +	// and keep it in memory.
  +	// Should cache the input stream, and load data when needed.
  +//	public FopImage(URL href) throws FopImageException;
  +
  +	// Get image general properties.
  +	// Methods throw exception because they can retrieve data
  +	// when needed.
  +
  +	// Ressource location
  +	public String getURL();
  +
  +	// image size
  +	public int getWidth() throws FopImageException;
  +	public int getHeight() throws FopImageException;
  +
  +	// DeviceGray, DeviceRGB, or DeviceCMYK
  +	public ColorSpace getColorSpace() throws FopImageException;
  +
  +	// bits per pixel
  +	public int getBitsPerPixel() throws FopImageException;
  +
  +	// For transparent images
  +	public boolean isTransparent() throws FopImageException;
  +	public PDFColor getTransparentColor() throws FopImageException;
  +
  +	// get the image bytes, and bytes properties
  +
  +	// get uncompressed image bytes
  +	public byte[] getBitmaps() throws FopImageException;
  +// width * (bitsPerPixel / 8) * height, no ?
  +	public int getBitmapsSize() throws FopImageException;
  +
  +	// get compressed image bytes
  +	// I don't know if we really need it, nor if it
  +	// should be changed...
  +	public byte[] getRessourceBytes() throws FopImageException;
  +	public int getRessourceBytesSize() throws FopImageException;
  +	// return null if no corresponding PDFFilter
  +	public PDFFilter getPDFFilter() throws FopImageException;
  +
  +	// release memory
  +	public void close();
   }