You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ke...@apache.org on 2002/07/01 12:33:31 UTC

cvs commit: xml-fop/src/org/apache/fop/svg PDFGraphics2D.java

keiron      2002/07/01 03:33:30

  Modified:    src/org/apache/fop/svg PDFGraphics2D.java
  Log:
  added bounds
  
  Revision  Changes    Path
  1.33      +4 -4      xml-fop/src/org/apache/fop/svg/PDFGraphics2D.java
  
  Index: PDFGraphics2D.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/PDFGraphics2D.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- PDFGraphics2D.java	28 Jun 2002 10:09:07 -0000	1.32
  +++ PDFGraphics2D.java	1 Jul 2002 10:33:30 -0000	1.33
  @@ -656,7 +656,6 @@
                       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 @@
               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,
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org