]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
added bounds
authorKeiron Liddle <keiron@apache.org>
Mon, 1 Jul 2002 10:33:30 +0000 (10:33 +0000)
committerKeiron Liddle <keiron@apache.org>
Mon, 1 Jul 2002 10:33:30 +0000 (10:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194938 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/svg/PDFGraphics2D.java

index db48aa2a419d4c3473a6bbf033170f94e8671747..35c589f027b600dd11284f9d0a22daa3f9b13633 100644 (file)
@@ -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,