diff options
author | Steve Coffman <gears@apache.org> | 2000-04-21 16:43:19 +0000 |
---|---|---|
committer | Steve Coffman <gears@apache.org> | 2000-04-21 16:43:19 +0000 |
commit | ce7cd8445a41ce5f81cc11eddf4daa076932642d (patch) | |
tree | d14fa71e5e090dd225f57a6fbf2f53c9fd9e5696 /src/org/apache/fop/pdf/PDFFunction.java | |
parent | c6eaf23f85c8a3ba35ae89b11ed46ead1bd2f0a0 (diff) | |
download | xmlgraphics-fop-ce7cd8445a41ce5f81cc11eddf4daa076932642d.tar.gz xmlgraphics-fop-ce7cd8445a41ce5f81cc11eddf4daa076932642d.zip |
This adds colorspace (RGB + CMYK) support to PDF output, and the ability
to switch colorspaces. I need to make a colorspace datatype before I'll
patch the render code.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193335 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/pdf/PDFFunction.java')
-rw-r--r-- | src/org/apache/fop/pdf/PDFFunction.java | 49 |
1 files changed, 45 insertions, 4 deletions
diff --git a/src/org/apache/fop/pdf/PDFFunction.java b/src/org/apache/fop/pdf/PDFFunction.java index 973c660d1..0e4b44222 100644 --- a/src/org/apache/fop/pdf/PDFFunction.java +++ b/src/org/apache/fop/pdf/PDFFunction.java @@ -208,7 +208,6 @@ public class PDFFunction extends PDFObject { super(theNumber); this.functionType = 0; //dang well better be 0; - this.size = theSize; this.bitsPerSample = theBitsPerSample; this.order = theOrder; //int @@ -403,6 +402,8 @@ public class PDFFunction extends PDFObject { } return(p.toString()); } + + /** * represent as PDF. Whatever the FunctionType is, the correct @@ -440,7 +441,11 @@ public class PDFFunction extends PDFObject { p.append("] \n"); } - + else + { + p.append("/Domain [ 0 1 ] \n"); + } + //SIZE if(this.size != null) { @@ -465,6 +470,17 @@ public class PDFFunction extends PDFObject { } p.append("] \n"); } + else + { + p.append("/Encode [ "); + vectorSize = this.functions.size(); + for(tempInt=0; tempInt < vectorSize; tempInt++) + { + p.append("0 1 "); + } + p.append("] \n"); + + } //BITSPERSAMPLE p.append("/BitsPerSample "+this.bitsPerSample); @@ -555,6 +571,11 @@ public class PDFFunction extends PDFObject { p.append("] \n"); } + else + { + p.append("/Domain [ 0 1 ] \n"); + } + //RANGE if(this.range != null) @@ -621,7 +642,11 @@ public class PDFFunction extends PDFObject { } p.append("] \n"); } - + else + { + p.append("/Domain [ 0 1 ] \n"); + } + //RANGE if(this.range != null) { @@ -663,6 +688,18 @@ public class PDFFunction extends PDFObject { p.append("] \n"); } + else + { + p.append("/Encode [ "); + vectorSize = this.functions.size(); + for(tempInt=0; tempInt < vectorSize; tempInt++) + { + p.append("0 1 "); + } + p.append("] \n"); + + } + //BOUNDS, required, but can be empty p.append("/Bounds [ "); @@ -720,7 +757,11 @@ public class PDFFunction extends PDFObject { p.append("] \n"); } - + else + { + p.append("/Domain [ 0 1 ] \n"); + } + //RANGE if(this.range != null) { |