From 5ac7db1128078e8eb79ea2a4810d8feeddae1d11 Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Mon, 1 Jul 2002 10:33:30 +0000 Subject: added bounds 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/apache') 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, -- cgit v1.2.3