aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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,