aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/svg
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-02-21 09:54:28 +0000
committerKeiron Liddle <keiron@apache.org>2002-02-21 09:54:28 +0000
commitfc9ae36c80dfaacf8ece2e9ddfc7514562dbf5cd (patch)
treeda590447386935437ec4dffcca99d849f9e80ee8 /src/org/apache/fop/svg
parent4e2d8dcbda10de725a8d024cf61574f87b66131d (diff)
downloadxmlgraphics-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/svg')
-rw-r--r--src/org/apache/fop/svg/PDFGraphics2D.java36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/org/apache/fop/svg/PDFGraphics2D.java b/src/org/apache/fop/svg/PDFGraphics2D.java
index 45bc493c1..21e9598e2 100644
--- a/src/org/apache/fop/svg/PDFGraphics2D.java
+++ b/src/org/apache/fop/svg/PDFGraphics2D.java
@@ -15,6 +15,7 @@ import org.apache.fop.image.*;
import org.apache.fop.datatypes.ColorSpace;
import org.apache.fop.render.pdf.CIDFont;
import org.apache.fop.render.pdf.fonts.LazyFont;
+import org.apache.fop.fo.FOUserAgent;
import org.apache.batik.ext.awt.g2d.*;
import org.apache.batik.ext.awt.image.GraphicsUtil;
@@ -320,7 +321,7 @@ public class PDFGraphics2D 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;
@@ -331,67 +332,75 @@ public class PDFGraphics2D 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;
}
@@ -780,7 +789,6 @@ public class PDFGraphics2D extends AbstractGraphics2D {
System.out.println("drawRenderedImage");
}
-
/**
* Renders a
* {@link RenderableImage},