]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Add image transparency support
authoreschaeffer <eschaeffer@unknown>
Mon, 29 May 2000 09:20:52 +0000 (09:20 +0000)
committereschaeffer <eschaeffer@unknown>
Mon, 29 May 2000 09:20:52 +0000 (09:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193388 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/pdf/PDFXObject.java

index 008dafccf59dc0a492a951c5ac49a3552bf32a04..f311bbb3b221b907ae34fff1ddaffdbc5169e9dc 100644 (file)
@@ -117,6 +117,10 @@ public class PDFXObject extends PDFObject {
                p = p + "/BitsPerComponent " + fopimage.getBitsPerPixel() + "\n";
                ColorSpace cs = fopimage.getColorSpace();
                p = p + "/ColorSpace /" + cs.getColorSpacePDFString() + "\n";
+               if (fopimage.isTransparent()) {
+                       PDFColor transp = fopimage.getTransparentColor();
+                       p = p + "/Mask [" + transp.red255() + " " + transp.red255() + " " + transp.green255() + " " + transp.green255() + " " + transp.blue255() + " " + transp.blue255() + "]\n";
+               }
                p = p + imgStream.getPDFDictionary();
                p = p + ">>\n";