aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-07-01 10:33:30 +0000
committerKeiron Liddle <keiron@apache.org>2002-07-01 10:33:30 +0000
commit5ac7db1128078e8eb79ea2a4810d8feeddae1d11 (patch)
treeb5e7002f71c37491d08f887cb18a43eb839a158b /src/org/apache
parentd370d3e33c8680676a5c174c721008782811860a (diff)
downloadxmlgraphics-fop-5ac7db1128078e8eb79ea2a4810d8feeddae1d11.tar.gz
xmlgraphics-fop-5ac7db1128078e8eb79ea2a4810d8feeddae1d11.zip
added bounds
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194938 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache')
-rw-r--r--src/org/apache/fop/svg/PDFGraphics2D.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/apache/fop/svg/PDFGraphics2D.java b/src/org/apache/fop/svg/PDFGraphics2D.java
index db48aa2a4..35c589f02 100644
--- a/src/org/apache/fop/svg/PDFGraphics2D.java
+++ b/src/org/apache/fop/svg/PDFGraphics2D.java
@@ -656,7 +656,6 @@ public class PDFGraphics2D extends AbstractGraphics2D {
color1.getVector(), color2.getVector(), 1.0);
PDFColorSpace aColorSpace = new PDFColorSpace(PDFColorSpace.DEVICE_RGB);
- PDFResources res = pdfDoc.makeResources();
PDFPattern myPat = this.pdfDoc.createGradient(resourceContext, false, aColorSpace,
someColors, null, theCoords);
currentStream.write(myPat.getColorSpaceOut(fill));
@@ -685,10 +684,11 @@ public class PDFGraphics2D extends AbstractGraphics2D {
float[] fractions = rgp.getFractions();
ArrayList theBounds = new ArrayList();
float lastoffset = 0;
- for(int count = 0; count < fractions.length; count++) {
+ for(int count = 1; count < fractions.length - 1; count++) {
float offset = fractions[count];
// create bounds from last to offset
lastoffset = offset;
+ theBounds.add(new Double(offset));
}
PDFColorSpace colSpace = new PDFColorSpace(PDFColorSpace.DEVICE_RGB);
PDFPattern myPat = pdfDoc.createGradient(resourceContext, true, colSpace,