diff options
author | Keiron Liddle <keiron@apache.org> | 2002-02-21 09:54:28 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2002-02-21 09:54:28 +0000 |
commit | fc9ae36c80dfaacf8ece2e9ddfc7514562dbf5cd (patch) | |
tree | da590447386935437ec4dffcca99d849f9e80ee8 /src/org/apache/fop/render | |
parent | 4e2d8dcbda10de725a8d024cf61574f87b66131d (diff) | |
download | xmlgraphics-fop-fc9ae36c80dfaacf8ece2e9ddfc7514562dbf5cd.tar.gz xmlgraphics-fop-fc9ae36c80dfaacf8ece2e9ddfc7514562dbf5cd.zip |
some preliminary changes to image handling
Images are put into a cache, different cahces are possible
if information is required it needs to be explicitly loaded
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194663 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/render')
-rw-r--r-- | src/org/apache/fop/render/ps/PSGraphics2D.java | 35 | ||||
-rw-r--r-- | src/org/apache/fop/render/ps/PSRenderer.java | 1 |
2 files changed, 22 insertions, 14 deletions
diff --git a/src/org/apache/fop/render/ps/PSGraphics2D.java b/src/org/apache/fop/render/ps/PSGraphics2D.java index 0ab552695..e2fe42180 100644 --- a/src/org/apache/fop/render/ps/PSGraphics2D.java +++ b/src/org/apache/fop/render/ps/PSGraphics2D.java @@ -13,6 +13,7 @@ import org.apache.fop.fonts.*; import org.apache.fop.render.pdf.*; import org.apache.fop.image.*; import org.apache.fop.datatypes.ColorSpace; +import org.apache.fop.fo.FOUserAgent; import org.apache.batik.ext.awt.g2d.*; @@ -235,7 +236,7 @@ public class PSGraphics2D extends AbstractGraphics2D { PDFColor transparent = new PDFColor(255, 255, 255); TempImage(int width, int height, byte[] result, - byte[] mask) throws FopImageException { + byte[] mask) { this.m_height = height; this.m_width = width; this.m_bitsPerPixel = 8; @@ -246,67 +247,75 @@ public class PSGraphics2D extends AbstractGraphics2D { this.m_mask = mask; } + public boolean load(int type, FOUserAgent ua) { + return true; + } + + public String getMimeType() { + return ""; + } + public String getURL() { return "" + m_bitmaps; } // image size - public int getWidth() throws FopImageException { + public int getWidth() { return m_width; } - public int getHeight() throws FopImageException { + public int getHeight() { return m_height; } // DeviceGray, DeviceRGB, or DeviceCMYK - public ColorSpace getColorSpace() throws FopImageException { + public ColorSpace getColorSpace() { return m_colorSpace; } // bits per pixel - public int getBitsPerPixel() throws FopImageException { + public int getBitsPerPixel() { return m_bitsPerPixel; } // For transparent images - public boolean isTransparent() throws FopImageException { + public boolean isTransparent() { return transparent != null; } - public PDFColor getTransparentColor() throws FopImageException { + public PDFColor getTransparentColor() { return transparent; } - public byte[] getMask() throws FopImageException { + public byte[] getMask() { return m_mask; } // get the image bytes, and bytes properties // get uncompressed image bytes - public byte[] getBitmaps() throws FopImageException { + public byte[] getBitmaps() { return m_bitmaps; } // width * (bitsPerPixel / 8) * height, no ? - public int getBitmapsSize() throws FopImageException { + public int getBitmapsSize() { return m_width * m_height * 3; } // 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 byte[] getRessourceBytes() { return null; } - public int getRessourceBytesSize() throws FopImageException { + public int getRessourceBytesSize() { return 0; } // return null if no corresponding PDFFilter - public PDFFilter getPDFFilter() throws FopImageException { + public PDFFilter getPDFFilter() { return null; } diff --git a/src/org/apache/fop/render/ps/PSRenderer.java b/src/org/apache/fop/render/ps/PSRenderer.java index 6a5699cec..cae6e4287 100644 --- a/src/org/apache/fop/render/ps/PSRenderer.java +++ b/src/org/apache/fop/render/ps/PSRenderer.java @@ -13,7 +13,6 @@ import org.apache.fop.render.AbstractRenderer; import org.apache.fop.render.Renderer; import org.apache.fop.image.ImageArea; import org.apache.fop.image.FopImage; -import org.apache.fop.image.FopImageException; import org.apache.fop.layout.*; import org.apache.fop.layout.inline.*; import org.apache.fop.datatypes.*; |