Lines 36-42
Link Here
|
36 |
import org.apache.xmlgraphics.java2d.color.NamedColorSpace; |
36 |
import org.apache.xmlgraphics.java2d.color.NamedColorSpace; |
37 |
import org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil; |
37 |
import org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil; |
38 |
|
38 |
|
39 |
import org.apache.fop.util.DecimalFormatCache; |
39 |
import org.apache.xmlgraphics.util.DoubleFormatUtil; |
40 |
|
40 |
|
41 |
/** |
41 |
/** |
42 |
* This class handles the registration of color spaces and the generation of PDF code to select |
42 |
* This class handles the registration of color spaces and the generation of PDF code to select |
Lines 225-233
Link Here
|
225 |
if (comps.length != componentCount) { |
225 |
if (comps.length != componentCount) { |
226 |
throw new IllegalStateException("Color with unexpected component count encountered"); |
226 |
throw new IllegalStateException("Color with unexpected component count encountered"); |
227 |
} |
227 |
} |
228 |
DecimalFormat df = DecimalFormatCache.getDecimalFormat(4); |
|
|
229 |
for (int i = 0, c = comps.length; i < c; i++) { |
228 |
for (int i = 0, c = comps.length; i < c; i++) { |
230 |
codeBuffer.append(df.format(comps[i])).append(" "); |
229 |
DoubleFormatUtil.formatDouble(comps[i], 4, 4, codeBuffer); |
|
|
230 |
codeBuffer.append(" "); |
231 |
} |
231 |
} |
232 |
codeBuffer.append(command).append("\n"); |
232 |
codeBuffer.append(command).append("\n"); |
233 |
} |
233 |
} |