You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by de...@apache.org on 2001/09/13 23:55:52 UTC

cvs commit: xml-batik/sources/org/apache/batik/ext/awt LinearGradientPaintContext.java MultipleGradientPaintContext.java RadialGradientPaintContext.java

deweese     01/09/13 14:55:52

  Modified:    samples  GVT.svg batikBatik.svg gradients.svg
                        logoTexture.svg
               samples/errors svg.svg
               samples/tests anchor.svg bboxOnText.svg colorProfile.svg
                        feConvolveMatrix.svg filterRegions.svg
                        gradientLimit.svg markersMisc.svg
                        markersOrientA.svg markersOrientB.svg
                        markersPreserveAspectRatio.svg markersShapes.svg
                        paintOpacity.svg radialGradient.svg
                        radialGradient2.svg radialGradient3.svg
                        rasterImageViewBox.svg rasterImageViewBoxClip.svg
                        rasterImageViewBoxOverflow.svg svg.svg svg2.svg
                        svg3.svg svgImageViewBox.svg
                        svgImageViewBoxClip.svg svgImageViewBoxOverflow.svg
                        symbolViewBox.svg symbolViewBoxClip.svg
                        symbolViewBoxOverflow.svg textEffect.svg
                        textEffect2.svg textEffect3.svg toolTips.svg
               sources/org/apache/batik/dom/util
                        SoftDoublyIndexedTable.java
               sources/org/apache/batik/ext/awt
                        LinearGradientPaintContext.java
                        MultipleGradientPaintContext.java
                        RadialGradientPaintContext.java
  Log:
  1) put back the '>' on the outermost svg elements that Stephane accidentally
     (or so I assume... :) removed when updating the DOCTYPE.
  2) Fixed a small bug in SoftDoublyIndexedTable.java (didn't handle
     case where a replaced element's soft reference was cleared).
  3) Fixed a bug in the handling of repeated stops at beginning and end
     of gradients (affected linear and radial)
  4) Fixed a bug in the handling of radial gradients with _really_ small
     radii.
  
  Revision  Changes    Path
  1.5       +2 -2      xml-batik/samples/GVT.svg
  
  Index: GVT.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/GVT.svg,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- GVT.svg	2001/09/13 14:01:03	1.4
  +++ GVT.svg	2001/09/13 21:55:50	1.5
  @@ -14,7 +14,7 @@
   <!-- GVT under the spot-light!                                                 -->
   <!--                                                                           -->
   <!-- @author vincent.hardy@eng.sun.com                                         -->
  -<!-- @version $Id: GVT.svg,v 1.4 2001/09/13 14:01:03 hillion Exp $ -->
  +<!-- @version $Id: GVT.svg,v 1.5 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ========================================================================= -->
   
   <svg width="450" height="500" viewBox="0 0 450 500">
  @@ -123,4 +123,4 @@
           </g>
       </g>
   
  -</svg
  +</svg>
  
  
  
  1.6       +2 -2      xml-batik/samples/batikBatik.svg
  
  Index: batikBatik.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/batikBatik.svg,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- batikBatik.svg	2001/09/13 14:01:03	1.5
  +++ batikBatik.svg	2001/09/13 21:55:50	1.6
  @@ -11,7 +11,7 @@
   
   <!-- ========================================================================= -->
   <!-- @author bill.haneman@ireland.sun.com                                      -->
  -<!-- @version $Id: batikBatik.svg,v 1.5 2001/09/13 14:01:03 hillion Exp $        -->
  +<!-- @version $Id: batikBatik.svg,v 1.6 2001/09/13 21:55:50 deweese Exp $        -->
   <!-- ========================================================================= -->
   
   <svg  width="450" height="500" xml:space="preserve" viewBox="0 0 450 500">
  @@ -202,4 +202,4 @@
           <use xlink:href="#stalk2" opacity="0.75"/>
       </g>
   
  -</svg
  +</svg>
  
  
  
  1.7       +2 -2      xml-batik/samples/gradients.svg
  
  Index: gradients.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/gradients.svg,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- gradients.svg	2001/09/13 14:01:03	1.6
  +++ gradients.svg	2001/09/13 21:55:50	1.7
  @@ -14,7 +14,7 @@
   <!-- Test description here                                                     -->
   <!--                                                                           -->
   <!-- @author vincent.hardy@eng.sun.com                                         -->
  -<!-- @version $Id: gradients.svg,v 1.6 2001/09/13 14:01:03 hillion Exp $                                                             -->
  +<!-- @version $Id: gradients.svg,v 1.7 2001/09/13 21:55:50 deweese Exp $                                                             -->
   <!-- ========================================================================= -->
   
   <svg width="450" height="500" viewBox="0 0 450 500">
  @@ -112,4 +112,4 @@
       <!-- Batik sample mark                                             -->
       <!-- ============================================================= -->
       <use xlink:href="batikLogo.svg#Batik_Tag_Box" />
  -</svg
  +</svg>
  
  
  
  1.6       +2 -2      xml-batik/samples/logoTexture.svg
  
  Index: logoTexture.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/logoTexture.svg,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- logoTexture.svg	2001/09/13 14:01:03	1.5
  +++ logoTexture.svg	2001/09/13 21:55:50	1.6
  @@ -11,7 +11,7 @@
   
   <!-- ========================================================================= -->
   <!-- @author vincent.hardy@eng.sun.com                                         -->
  -<!-- @version $Id: logoTexture.svg,v 1.5 2001/09/13 14:01:03 hillion Exp $ -->
  +<!-- @version $Id: logoTexture.svg,v 1.6 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ========================================================================= -->
   
   <svg  width="450" height="500" xml:space="preserve" viewBox="0 0 450 500">
  @@ -167,4 +167,4 @@
       <rect x="1" y="1" width="446" height="496" fill="none" stroke="black" />
       <use xlink:href="#BatikTag" />
       
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/errors/svg.svg
  
  Index: svg.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/errors/svg.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- svg.svg	2001/09/13 14:01:04	1.2
  +++ svg.svg	2001/09/13 21:55:50	1.3
  @@ -13,7 +13,7 @@
   <!-- ========================================================================= -->
   <!-- Referenced from image.svg                                                 -->
   <!-- @author vincent.hardy@eng.sun.com                                         -->
  -<!-- @version $Id: svg.svg,v 1.2 2001/09/13 14:01:04 hillion Exp $ -->
  +<!-- @version $Id: svg.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ========================================================================= -->
   <svg width="230" height="170" viewBox="0 0 230 170" preserveAspectRatio="xMidYMin slice" >
       <defs>
  @@ -72,4 +72,4 @@
       <use xlink:href="#Sprite" fill="url(#spriteGradient)"/>
       <use xlink:href="#Ball" fill="url(#ballGradient)"/>
       
  -</svg
  +</svg>
  
  
  
  1.4       +2 -2      xml-batik/samples/tests/anchor.svg
  
  Index: anchor.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/anchor.svg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- anchor.svg	2001/09/13 14:01:07	1.3
  +++ anchor.svg	2001/09/13 21:55:50	1.4
  @@ -15,7 +15,7 @@
   <!-- various element types.                                                    -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: anchor.svg,v 1.3 2001/09/13 14:01:07 hillion Exp $ -->
  +<!-- @version $Id: anchor.svg,v 1.4 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -248,4 +248,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.4       +2 -2      xml-batik/samples/tests/bboxOnText.svg
  
  Index: bboxOnText.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/bboxOnText.svg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- bboxOnText.svg	2001/09/13 14:01:07	1.3
  +++ bboxOnText.svg	2001/09/13 21:55:50	1.4
  @@ -14,7 +14,7 @@
   <!-- Test created after bug submitted by cjolif@ilog.fr showing a problem with -->
   <!-- radialGradient with objectBoundingBox on a text element.                  -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: bboxOnText.svg,v 1.3 2001/09/13 14:01:07 hillion Exp $ -->
  +<!-- @version $Id: bboxOnText.svg,v 1.4 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -47,4 +47,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/colorProfile.svg
  
  Index: colorProfile.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/colorProfile.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- colorProfile.svg	2001/09/13 14:01:07	1.2
  +++ colorProfile.svg	2001/09/13 21:55:50	1.3
  @@ -16,7 +16,7 @@
   <!-- Base64 images. It also exercises the various rendering-intent options.    -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: colorProfile.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $   -->
  +<!-- @version $Id: colorProfile.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $   -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -310,4 +310,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.5       +1 -1      xml-batik/samples/tests/feConvolveMatrix.svg
  
  Index: feConvolveMatrix.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/feConvolveMatrix.svg,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- feConvolveMatrix.svg	2001/09/13 14:01:07	1.4
  +++ feConvolveMatrix.svg	2001/09/13 21:55:50	1.5
  @@ -335,4 +335,4 @@
     <!-- ============================================================= -->
     <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
     
  -</svg
  +</svg>
  
  
  
  1.11      +2 -2      xml-batik/samples/tests/filterRegions.svg
  
  Index: filterRegions.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/filterRegions.svg,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- filterRegions.svg	2001/09/13 14:01:07	1.10
  +++ filterRegions.svg	2001/09/13 21:55:50	1.11
  @@ -18,7 +18,7 @@
   <!-- of the filter.                                                            -->
   <!--                                                                           -->
   <!-- @author vincent.hardy@eng.sun.com                                         -->
  -<!-- @version $Id: filterRegions.svg,v 1.10 2001/09/13 14:01:07 hillion Exp $    -->
  +<!-- @version $Id: filterRegions.svg,v 1.11 2001/09/13 21:55:50 deweese Exp $    -->
   <!-- ========================================================================= -->
   
   <?xml-stylesheet type="text/css" href="test.css" ?>
  @@ -469,4 +469,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />    
   
  -</svg
  +</svg>
  
  
  
  1.2       +3 -3      xml-batik/samples/tests/gradientLimit.svg
  
  Index: gradientLimit.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/gradientLimit.svg,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- gradientLimit.svg	2001/09/13 08:36:41	1.1
  +++ gradientLimit.svg	2001/09/13 21:55:50	1.2
  @@ -14,7 +14,7 @@
   <!-- Limit test on gradients.                                                  -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: gradientLimit.svg,v 1.1 2001/09/13 08:36:41 vhardy Exp $   -->
  +<!-- @version $Id: gradientLimit.svg,v 1.2 2001/09/13 21:55:50 deweese Exp $   -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   <svg id="body" width="450" height="500" viewBox="0 0 450 500">
  @@ -94,7 +94,7 @@
               <text class="legend" x="75" y="150">&lt;linearGradient&gt;</text>
           </g>
   
  -        <!--<g id="smallRadiusRadial" transform="translate(300, 100)">
  +        <g id="smallRadiusRadial" transform="translate(300, 100)">
               <title>Small radius on radialGradient</title>
               <desc>The radialGradient has a very small
                     (0.00000001) radius</desc>
  @@ -105,7 +105,7 @@
               <rect fill="url(#smallRadiusRadialGradient)" x=".35" y=".8" width=".8" height=".4" transform="scale(100)"/>
               <text class="legend" x="75" y="135">Small Radius</text>
               <text class="legend" x="75" y="150">&lt;radialGradient&gt;</text>
  -        </g>-->
  +        </g>
       </g>
   
       <!-- ============================================================= -->
  
  
  
  1.6       +2 -2      xml-batik/samples/tests/markersMisc.svg
  
  Index: markersMisc.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/markersMisc.svg,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- markersMisc.svg	2001/09/13 14:01:07	1.5
  +++ markersMisc.svg	2001/09/13 21:55:50	1.6
  @@ -15,7 +15,7 @@
   <!-- marker-end.                                                               -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: markersMisc.svg,v 1.5 2001/09/13 14:01:07 hillion Exp $   -->
  +<!-- @version $Id: markersMisc.svg,v 1.6 2001/09/13 21:55:50 deweese Exp $   -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -255,4 +255,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.5       +2 -2      xml-batik/samples/tests/markersOrientA.svg
  
  Index: markersOrientA.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/markersOrientA.svg,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- markersOrientA.svg	2001/09/13 14:01:07	1.4
  +++ markersOrientA.svg	2001/09/13 21:55:50	1.5
  @@ -15,7 +15,7 @@
   <!-- marker-end.                                                               -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: markersOrientA.svg,v 1.4 2001/09/13 14:01:07 hillion Exp $   -->
  +<!-- @version $Id: markersOrientA.svg,v 1.5 2001/09/13 21:55:50 deweese Exp $   -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -273,4 +273,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.4       +2 -2      xml-batik/samples/tests/markersOrientB.svg
  
  Index: markersOrientB.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/markersOrientB.svg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- markersOrientB.svg	2001/09/13 14:01:07	1.3
  +++ markersOrientB.svg	2001/09/13 21:55:50	1.4
  @@ -15,7 +15,7 @@
   <!-- marker-end.                                                               -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: markersOrientB.svg,v 1.3 2001/09/13 14:01:07 hillion Exp $   -->
  +<!-- @version $Id: markersOrientB.svg,v 1.4 2001/09/13 21:55:50 deweese Exp $   -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -177,4 +177,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.4       +2 -2      xml-batik/samples/tests/markersPreserveAspectRatio.svg
  
  Index: markersPreserveAspectRatio.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/markersPreserveAspectRatio.svg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- markersPreserveAspectRatio.svg	2001/09/13 14:01:07	1.3
  +++ markersPreserveAspectRatio.svg	2001/09/13 21:55:50	1.4
  @@ -15,7 +15,7 @@
   <!-- marker-end.                                                               -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: markersPreserveAspectRatio.svg,v 1.3 2001/09/13 14:01:07 hillion Exp $   -->
  +<!-- @version $Id: markersPreserveAspectRatio.svg,v 1.4 2001/09/13 21:55:50 deweese Exp $   -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -569,4 +569,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.6       +2 -2      xml-batik/samples/tests/markersShapes.svg
  
  Index: markersShapes.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/markersShapes.svg,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- markersShapes.svg	2001/09/13 14:01:07	1.5
  +++ markersShapes.svg	2001/09/13 21:55:50	1.6
  @@ -14,7 +14,7 @@
   <!-- This test shows the various shapes that can have markers.                 -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: markersShapes.svg,v 1.5 2001/09/13 14:01:07 hillion Exp $  -->
  +<!-- @version $Id: markersShapes.svg,v 1.6 2001/09/13 21:55:50 deweese Exp $  -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>
   
  @@ -138,4 +138,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/paintOpacity.svg
  
  Index: paintOpacity.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/paintOpacity.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- paintOpacity.svg	2001/09/13 14:01:07	1.2
  +++ paintOpacity.svg	2001/09/13 21:55:50	1.3
  @@ -15,7 +15,7 @@
   <!-- into account for all the types of Paint servers                           -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: paintOpacity.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $   -->
  +<!-- @version $Id: paintOpacity.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $   -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -220,4 +220,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.4       +2 -2      xml-batik/samples/tests/radialGradient.svg
  
  Index: radialGradient.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/radialGradient.svg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- radialGradient.svg	2001/09/13 14:01:07	1.3
  +++ radialGradient.svg	2001/09/13 21:55:50	1.4
  @@ -12,7 +12,7 @@
   
   <!-- ========================================================================= -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: radialGradient.svg,v 1.3 2001/09/13 14:01:07 hillion Exp $ -->
  +<!-- @version $Id: radialGradient.svg,v 1.4 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -241,4 +241,4 @@
           </g>
   
       </g>
  -</svg
  +</svg>
  
  
  
  1.4       +2 -2      xml-batik/samples/tests/radialGradient2.svg
  
  Index: radialGradient2.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/radialGradient2.svg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- radialGradient2.svg	2001/09/13 14:01:07	1.3
  +++ radialGradient2.svg	2001/09/13 21:55:50	1.4
  @@ -13,7 +13,7 @@
   <!-- ====================================================================== -->
   <!-- @author deweese@apache.org                                             -->
   <!-- @author vhardy@apache.org                                              -->
  -<!-- @version $Id: radialGradient2.svg,v 1.3 2001/09/13 14:01:07 hillion Exp $ -->
  +<!-- @version $Id: radialGradient2.svg,v 1.4 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ====================================================================== -->
   
   <?xml-stylesheet type="text/css" href="test.css" ?>  
  @@ -247,4 +247,4 @@
           </g>
   
       </g>
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/radialGradient3.svg
  
  Index: radialGradient3.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/radialGradient3.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- radialGradient3.svg	2001/09/13 14:01:07	1.2
  +++ radialGradient3.svg	2001/09/13 21:55:50	1.3
  @@ -13,7 +13,7 @@
   <!-- ====================================================================== -->
   <!-- @author deweese@apache.org                                             -->
   <!-- @author vhardy@apache.org                                              -->
  -<!-- @version $Id: radialGradient3.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $ -->
  +<!-- @version $Id: radialGradient3.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ====================================================================== -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -244,4 +244,4 @@
           </g>
   
       </g>
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/rasterImageViewBox.svg
  
  Index: rasterImageViewBox.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/rasterImageViewBox.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- rasterImageViewBox.svg	2001/09/13 14:01:07	1.2
  +++ rasterImageViewBox.svg	2001/09/13 21:55:50	1.3
  @@ -15,7 +15,7 @@
   <!-- for <image> elements.                                                     -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: rasterImageViewBox.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $  -->
  +<!-- @version $Id: rasterImageViewBox.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $  -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -443,4 +443,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/rasterImageViewBoxClip.svg
  
  Index: rasterImageViewBoxClip.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/rasterImageViewBoxClip.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- rasterImageViewBoxClip.svg	2001/09/13 14:01:07	1.2
  +++ rasterImageViewBoxClip.svg	2001/09/13 21:55:50	1.3
  @@ -16,7 +16,7 @@
   <!-- the <image> tag.                                                          -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: rasterImageViewBoxClip.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $  -->
  +<!-- @version $Id: rasterImageViewBoxClip.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $  -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -495,4 +495,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/rasterImageViewBoxOverflow.svg
  
  Index: rasterImageViewBoxOverflow.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/rasterImageViewBoxOverflow.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- rasterImageViewBoxOverflow.svg	2001/09/13 14:01:07	1.2
  +++ rasterImageViewBoxOverflow.svg	2001/09/13 21:55:50	1.3
  @@ -15,7 +15,7 @@
   <!-- for <image> elements.                                                     -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: rasterImageViewBoxOverflow.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $  -->
  +<!-- @version $Id: rasterImageViewBoxOverflow.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $  -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -427,4 +427,4 @@
   
       </g><!-- "content" -->
   
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/svg.svg
  
  Index: svg.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/svg.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- svg.svg	2001/09/13 14:01:07	1.2
  +++ svg.svg	2001/09/13 21:55:50	1.3
  @@ -13,7 +13,7 @@
   <!-- ========================================================================= -->
   <!-- Referenced from image.svg                                                 -->
   <!-- @author vincent.hardy@eng.sun.com                                         -->
  -<!-- @version $Id: svg.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $ -->
  +<!-- @version $Id: svg.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ========================================================================= -->
   <svg width="230" height="170" viewBox="0 0 230 170" preserveAspectRatio="xMidYMin slice" >
       <defs>
  @@ -72,4 +72,4 @@
       <use xlink:href="#Sprite" fill="url(#spriteGradient)"/>
       <use xlink:href="#Ball" fill="url(#ballGradient)"/>
       
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/svg2.svg
  
  Index: svg2.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/svg2.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- svg2.svg	2001/09/13 14:01:07	1.2
  +++ svg2.svg	2001/09/13 21:55:50	1.3
  @@ -13,7 +13,7 @@
   <!-- ========================================================================= -->
   <!-- Referenced from svgImageXXX.svg                                           -->
   <!-- @author vincent.hardy@eng.sun.com                                         -->
  -<!-- @version $Id: svg2.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $   -->
  +<!-- @version $Id: svg2.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $   -->
   <!-- ========================================================================= -->
   <svg width="30" height="50" viewBox="-10 -10 20 20">
       <g id="smilley">
  @@ -27,4 +27,4 @@
               <path d="M 10 19 A 8 8 0 0 0 20 19" stroke="black" stroke-width="1" fill="none"/>
           </g>
       </g>
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/svg3.svg
  
  Index: svg3.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/svg3.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- svg3.svg	2001/09/13 14:01:07	1.2
  +++ svg3.svg	2001/09/13 21:55:50	1.3
  @@ -13,7 +13,7 @@
   <!-- ========================================================================= -->
   <!-- Referenced from svgImageXXX.svg                                           -->
   <!-- @author vincent.hardy@eng.sun.com                                         -->
  -<!-- @version $Id: svg3.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $   -->
  +<!-- @version $Id: svg3.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $   -->
   <!-- ========================================================================= -->
   <svg width="30" height="30" viewBox="-10 -10 20 20">
       <g id="smilley">
  @@ -28,4 +28,4 @@
               <path d="M 10 19 A 8 8 0 0 0 20 19" stroke="black" stroke-width="1" fill="none"/>
           </g>
       </g>
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/svgImageViewBox.svg
  
  Index: svgImageViewBox.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/svgImageViewBox.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- svgImageViewBox.svg	2001/09/13 14:01:07	1.2
  +++ svgImageViewBox.svg	2001/09/13 21:55:50	1.3
  @@ -15,7 +15,7 @@
   <!-- for <image> elements.                                                     -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: svgImageViewBox.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $  -->
  +<!-- @version $Id: svgImageViewBox.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $  -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -443,4 +443,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/svgImageViewBoxClip.svg
  
  Index: svgImageViewBoxClip.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/svgImageViewBoxClip.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- svgImageViewBoxClip.svg	2001/09/13 14:01:07	1.2
  +++ svgImageViewBoxClip.svg	2001/09/13 21:55:50	1.3
  @@ -16,7 +16,7 @@
   <!-- the <image> tag.                                                          -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: svgImageViewBoxClip.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $  -->
  +<!-- @version $Id: svgImageViewBoxClip.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $  -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -495,4 +495,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/svgImageViewBoxOverflow.svg
  
  Index: svgImageViewBoxOverflow.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/svgImageViewBoxOverflow.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- svgImageViewBoxOverflow.svg	2001/09/13 14:01:07	1.2
  +++ svgImageViewBoxOverflow.svg	2001/09/13 21:55:50	1.3
  @@ -15,7 +15,7 @@
   <!-- for <image> elements.                                                     -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: svgImageViewBoxOverflow.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $  -->
  +<!-- @version $Id: svgImageViewBoxOverflow.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $  -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -432,4 +432,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.5       +2 -2      xml-batik/samples/tests/symbolViewBox.svg
  
  Index: symbolViewBox.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/symbolViewBox.svg,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- symbolViewBox.svg	2001/09/13 14:01:07	1.4
  +++ symbolViewBox.svg	2001/09/13 21:55:50	1.5
  @@ -15,7 +15,7 @@
   <!-- for <symbol> elements.                                                    -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: symbolViewBox.svg,v 1.4 2001/09/13 14:01:07 hillion Exp $   -->
  +<!-- @version $Id: symbolViewBox.svg,v 1.5 2001/09/13 21:55:50 deweese Exp $   -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -532,4 +532,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.4       +2 -2      xml-batik/samples/tests/symbolViewBoxClip.svg
  
  Index: symbolViewBoxClip.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/symbolViewBoxClip.svg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- symbolViewBoxClip.svg	2001/09/13 14:01:07	1.3
  +++ symbolViewBoxClip.svg	2001/09/13 21:55:50	1.4
  @@ -17,7 +17,7 @@
   <!-- property applies.                                                         -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: symbolViewBoxClip.svg,v 1.3 2001/09/13 14:01:07 hillion Exp $    -->
  +<!-- @version $Id: symbolViewBoxClip.svg,v 1.4 2001/09/13 21:55:50 deweese Exp $    -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -632,4 +632,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.4       +2 -2      xml-batik/samples/tests/symbolViewBoxOverflow.svg
  
  Index: symbolViewBoxOverflow.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/symbolViewBoxOverflow.svg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- symbolViewBoxOverflow.svg	2001/09/13 14:01:07	1.3
  +++ symbolViewBoxOverflow.svg	2001/09/13 21:55:50	1.4
  @@ -16,7 +16,7 @@
   <!-- establish a new viewport and therefore, the overflow property applies.    -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: symbolViewBoxOverflow.svg,v 1.3 2001/09/13 14:01:07 hillion Exp $    -->
  +<!-- @version $Id: symbolViewBoxOverflow.svg,v 1.4 2001/09/13 21:55:50 deweese Exp $    -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -540,4 +540,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.4       +2 -2      xml-batik/samples/tests/textEffect.svg
  
  Index: textEffect.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/textEffect.svg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- textEffect.svg	2001/09/13 14:01:07	1.3
  +++ textEffect.svg	2001/09/13 21:55:50	1.4
  @@ -14,7 +14,7 @@
   <!--  text effects                                                             -->
   <!--                                                                           -->
   <!-- @author tkormann@apache.org                                               -->
  -<!-- @version $Id: textEffect.svg,v 1.3 2001/09/13 14:01:07 hillion Exp $ -->
  +<!-- @version $Id: textEffect.svg,v 1.4 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ========================================================================= -->
   
   <?xml-stylesheet type="text/css" href="test.css" ?>
  @@ -106,4 +106,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/textEffect2.svg
  
  Index: textEffect2.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/textEffect2.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- textEffect2.svg	2001/09/13 14:01:07	1.2
  +++ textEffect2.svg	2001/09/13 21:55:50	1.3
  @@ -14,7 +14,7 @@
   <!--  text effects                                                             -->
   <!--                                                                           -->
   <!-- @author tkormann@apache.org                                               -->
  -<!-- @version $Id: textEffect2.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $ -->
  +<!-- @version $Id: textEffect2.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ========================================================================= -->
   
   <?xml-stylesheet type="text/css" href="test.css" ?>
  @@ -81,4 +81,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/textEffect3.svg
  
  Index: textEffect3.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/textEffect3.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- textEffect3.svg	2001/09/13 14:01:07	1.2
  +++ textEffect3.svg	2001/09/13 21:55:50	1.3
  @@ -14,7 +14,7 @@
   <!--  text effects                                                             -->
   <!--                                                                           -->
   <!-- @author tkormann@apache.org                                               -->
  -<!-- @version $Id: textEffect3.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $ -->
  +<!-- @version $Id: textEffect3.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ========================================================================= -->
   
   <?xml-stylesheet type="text/css" href="test.css" ?>
  @@ -106,4 +106,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.3       +2 -2      xml-batik/samples/tests/toolTips.svg
  
  Index: toolTips.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/toolTips.svg,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- toolTips.svg	2001/09/13 14:01:07	1.2
  +++ toolTips.svg	2001/09/13 21:55:50	1.3
  @@ -19,7 +19,7 @@
   <!-- tooltips do not 'show through' elements.                                  -->
   <!--                                                                           -->
   <!-- @author vhardy@apache.org                                                 -->
  -<!-- @version $Id: toolTips.svg,v 1.2 2001/09/13 14:01:07 hillion Exp $ -->
  +<!-- @version $Id: toolTips.svg,v 1.3 2001/09/13 21:55:50 deweese Exp $ -->
   <!-- ========================================================================= -->
   <?xml-stylesheet type="text/css" href="test.css" ?>  
   
  @@ -439,4 +439,4 @@
       <!-- ============================================================= -->
       <use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
   
  -</svg
  +</svg>
  
  
  
  1.2       +2 -2      xml-batik/sources/org/apache/batik/dom/util/SoftDoublyIndexedTable.java
  
  Index: SoftDoublyIndexedTable.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/util/SoftDoublyIndexedTable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SoftDoublyIndexedTable.java	2001/09/10 12:26:13	1.1
  +++ SoftDoublyIndexedTable.java	2001/09/13 21:55:52	1.2
  @@ -16,7 +16,7 @@
    * soft references to the contained values..
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: SoftDoublyIndexedTable.java,v 1.1 2001/09/10 12:26:13 hillion Exp $
  + * @version $Id: SoftDoublyIndexedTable.java,v 1.2 2001/09/13 21:55:52 deweese Exp $
    */
   public class SoftDoublyIndexedTable {
       
  @@ -160,7 +160,7 @@
               if (t == e) {
                   table[index] = e.next;
               } else {
  -                loop: for (;;) {
  +                loop: for (;t!=null;) {
                       Entry c = t.next;
                       if (c == e) {
                           t.next = e.next;
  
  
  
  1.7       +33 -31    xml-batik/sources/org/apache/batik/ext/awt/LinearGradientPaintContext.java
  
  Index: LinearGradientPaintContext.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/ext/awt/LinearGradientPaintContext.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- LinearGradientPaintContext.java	2001/09/10 18:59:45	1.6
  +++ LinearGradientPaintContext.java	2001/09/13 21:55:52	1.7
  @@ -18,7 +18,7 @@
    * 
    * @author Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans
    * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  - * @version $Id: LinearGradientPaintContext.java,v 1.6 2001/09/10 18:59:45 deweese Exp $
  + * @version $Id: LinearGradientPaintContext.java,v 1.7 2001/09/13 21:55:52 deweese Exp $
    * @see java.awt.PaintContext
    * @see java.awt.Paint
    * @see java.awt.GradientPaint
  @@ -125,52 +125,50 @@
               final int rowLimit = off+w;  // end of row iteration
   
               if (dgdX == 0) {
  -                int gradIdx;
  -                if (g <= 0) {
  -                    g = 0;
  -                    gradIdx = 0;
  -                } else if (g >= 1) {
  -                    g = 1; 
  -                    gradIdx = gradientsLength-1;
  -                } else {
  +                // System.out.println("In fillHard: " + g);
  +                final int val;
  +                if (g <= 0) 
  +                    val = gradientUnderflow;
  +                else if (g >= 1)
  +                    val = gradientOverflow;
  +                else {
                       // Could be a binary search...
  -                    gradIdx = 0;
  +                    int gradIdx = 0;
                       while (gradIdx < gradientsLength-1) {
                           if (g < fractions[gradIdx+1])
                               break;
                           gradIdx++;
                       }
  +                    float delta = (g-fractions[gradIdx]);
  +                    float idx  = ((delta*GRADIENT_SIZE_INDEX)
  +                                  /normalizedIntervals[gradIdx])+0.5f;
  +                    val = gradients[gradIdx][(int)idx];
                   }
   
  -                float delta = (g-fractions[gradIdx]);
  -                float idx  = ((delta*GRADIENT_SIZE_INDEX)
  -                              /normalizedIntervals[gradIdx])+0.5f;
  -                final int val = gradients[gradIdx][(int)idx];
                   while (off < rowLimit) {
                       pixels[off++] = val;
                   }
               } else {
  +                // System.out.println("In fillHard2: " + g);
                   int gradSteps;
                   int preGradSteps;
                   final int preVal, postVal;
  -                if (dgdX > 0) {
  +                if (dgdX >= 0) {
                       gradSteps    = (int)         ((1-g)/dgdX);
                       preGradSteps = (int)Math.ceil((0-g)/dgdX);
  -                    preVal  = gradients[0][0];
  -                    postVal = 
  -                        gradients[gradients.length-1][GRADIENT_SIZE_INDEX];
  +                    preVal  = gradientUnderflow;
  +                    postVal = gradientOverflow;
                   } else { // dgdX < 0
                       gradSteps    = (int)         ((0-g)/dgdX);
                       preGradSteps = (int)Math.ceil((1-g)/dgdX);
  -                    preVal  = 
  -                        gradients[gradients.length-1][GRADIENT_SIZE_INDEX];
  -                    postVal = gradients[0][0];
  +                    preVal  = gradientOverflow;
  +                    postVal = gradientUnderflow;
                   }
   
                   if (gradSteps > w) 
                       gradSteps = w;
  -                final int gradLimit    = off + gradSteps;
   
  +                final int gradLimit    = off + gradSteps;
                   if (preGradSteps > 0) {
                       if (preGradSteps > w)
                           preGradSteps = w;
  @@ -273,30 +271,34 @@
               final int rowLimit = off+w;  // end of row iteration
   
               if (dgdX == 0) {
  -                if (g<0) 
  -                    g = 0;
  -                else if (g>fastGradientArraySize) 
  -                    g = fastGradientArraySize;
  -                final int val = grad[(int)g];
  +                // System.out.println("In fillSimpleNC: " + g);
  +                final int val;
  +                if (g<=0) 
  +                    val = gradientUnderflow;
  +                else if (g>=fastGradientArraySize) 
  +                    val = gradientOverflow;
  +                else 
  +                    val = grad[(int)g];
                   while (off < rowLimit) {
                       pixels[off++] = val;
                   }
               } else {
  +                // System.out.println("In fillSimpleNC2: " + g);
                   int gradSteps;
                   int preGradSteps;
                   final int preVal, postVal;
                   if (dgdX > 0) {
                       gradSteps = (int)((fastGradientArraySize-g)/step);
                       preGradSteps = (int)Math.ceil(0-g/step);
  -                    preVal  = grad[0];
  -                    postVal = grad[fastGradientArraySize];
  +                    preVal  = gradientUnderflow;
  +                    postVal = gradientOverflow;
   
                   } else { // dgdX < 0
                       gradSteps    = (int)((0-g)/step);
                       preGradSteps = 
                           (int)Math.ceil((fastGradientArraySize-g)/step);
  -                    preVal  = grad[fastGradientArraySize];
  -                    postVal = grad[0];
  +                    preVal  = gradientOverflow;
  +                    postVal = gradientUnderflow;
                   }
   
                   if (gradSteps > w) 
  
  
  
  1.9       +40 -30    xml-batik/sources/org/apache/batik/ext/awt/MultipleGradientPaintContext.java
  
  Index: MultipleGradientPaintContext.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/ext/awt/MultipleGradientPaintContext.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MultipleGradientPaintContext.java	2001/07/12 15:07:45	1.8
  +++ MultipleGradientPaintContext.java	2001/09/13 21:55:52	1.9
  @@ -23,7 +23,7 @@
    *
    * @author Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans
    * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  - * @version $Id: MultipleGradientPaintContext.java,v 1.8 2001/07/12 15:07:45 deweese Exp $
  + * @version $Id: MultipleGradientPaintContext.java,v 1.9 2001/09/13 21:55:52 deweese Exp $
    *
    */
   abstract class MultipleGradientPaintContext implements PaintContext {
  @@ -117,6 +117,14 @@
        */
       protected int gradientAverage;
   
  +    /** This holds the color to use when we are off the bottom of the
  +     * gradient */
  +    protected int gradientUnderflow;
  +
  +    /** This holds the color to use when we are off the top of the
  +     * gradient */
  +    protected int gradientOverflow;
  +
       /** Length of the 2D slow lookup gradients array. */
       protected int gradientsLength;
   
  @@ -203,6 +211,9 @@
           Color [] hiColors   = new Color[len-1];
           normalizedIntervals = new float[len-1];
   
  +        gradientUnderflow = colors[0].getRGB();
  +        gradientOverflow  = colors[colors.length-1].getRGB();
  +
           int idx = 0;
           if (fixFirst) {
               this.fractions[0] = 0;
  @@ -282,12 +293,14 @@
                   loColors[i] = 
                       new Color(SRGBtoLinearRGB[loColors[i].getRed()],
                                 SRGBtoLinearRGB[loColors[i].getGreen()],
  -                              SRGBtoLinearRGB[loColors[i].getBlue()]);
  +                              SRGBtoLinearRGB[loColors[i].getBlue()],
  +                              loColors[i].getAlpha());
                   
                   hiColors[i] = 
                       new Color(SRGBtoLinearRGB[hiColors[i].getRed()],
                                 SRGBtoLinearRGB[hiColors[i].getGreen()],
  -                              SRGBtoLinearRGB[hiColors[i].getBlue()]);
  +                              SRGBtoLinearRGB[hiColors[i].getBlue()],
  +                              hiColors[i].getAlpha());
               }
           }
   
  @@ -445,6 +458,8 @@
                       gradient[i] =
                           convertEntireColorLinearRGBtoSRGB(gradient[i]);
                   }
  +                gradientAverage = 
  +                    convertEntireColorLinearRGBtoSRGB(gradientAverage);
               }
           } else {
               if (dataModel.getColorSpace() ==
  @@ -453,6 +468,8 @@
                       gradient[i] =
                           convertEntireColorSRGBtoLinearRGB(gradient[i]);
                   }
  +                gradientAverage = 
  +                    convertEntireColorSRGBtoLinearRGB(gradientAverage);
               }
           }
   
  @@ -540,6 +557,8 @@
                               convertEntireColorLinearRGBtoSRGB(gradients[j][i]);
                       }
                   }
  +                gradientAverage = 
  +                    convertEntireColorLinearRGBtoSRGB(gradientAverage);
               }
           } else {
               if (dataModel.getColorSpace() ==
  @@ -550,6 +569,8 @@
                               convertEntireColorSRGBtoLinearRGB(gradients[j][i]);
                       }
                   }
  +                gradientAverage = 
  +                    convertEntireColorSRGBtoLinearRGB(gradientAverage);
               }
           }
       }
  @@ -663,12 +684,12 @@
   
           if (cycleMethod == MultipleGradientPaint.NO_CYCLE) {
   
  -            if (position > 1) { //upper bound is 1
  -                position = 1;
  +            if (position >= 1) { //upper bound is 1
  +                return gradientOverflow;
               }
   
  -            else if (position < 0) { //lower bound is 0
  -                position = 0;
  +            else if (position <= 0) { //lower bound is 0
  +                return gradientUnderflow;
               }
           }
   
  @@ -776,7 +797,7 @@
   
           }
   
  -        return gradients[gradients.length - 1][GRADIENT_SIZE_INDEX];
  +        return gradientOverflow;
       }
   
   
  @@ -799,21 +820,17 @@
               float p1 = position-(sz/2);
               float p2 = position+(sz/2);
   
  -            if (p1 > 1) {
  -                if (isSimpleLookup)
  -                    return gradient[fastGradientArraySize];
  -                else 
  -                    return gradients[gradients.length-1][GRADIENT_SIZE_INDEX];
  -            }
  -            if (p2 < 0) {
  -                if (isSimpleLookup) return gradient[0];
  -                else                return gradients[0][0];
  -            }
  +            if (p1 >= 1) 
  +                return gradientOverflow;
  +
  +            if (p2 <= 0) 
  +                return gradientUnderflow;
  +
               int interior;
               float top_weight=0, bottom_weight=0, frac;
  -            if (p2 > 1) {
  +            if (p2 >= 1) {
                   top_weight = (p2-1)/sz;
  -                if (p1 <0) {
  +                if (p1 <= 0) {
                       bottom_weight = -p1/sz;
                       frac=1;
                       interior = gradientAverage;
  @@ -821,7 +838,7 @@
                       frac=1-p1;
                       interior = getAntiAlias(p1, true, 1, false, 1-p1, 1);
                   }
  -            } else if (p1 < 0) {
  +            } else if (p1 <= 0) {
                   bottom_weight = -p1/sz;
                   frac = p2;
                   interior = getAntiAlias(0, true, p2, false, p2, 1);
  @@ -835,10 +852,7 @@
               int pB = (((interior<<  4)&0xFF0)*norm)>>16;
   
               if (bottom_weight != 0) {
  -                int bPix;
  -                if (isSimpleLookup) bPix = gradient[0];
  -                else                bPix = gradients[0][0];
  -
  +                int bPix = gradientUnderflow;
                   // System.out.println("ave: " + gradientAverage);
                   norm = (int)((1<<16)*bottom_weight);
                   pA += (((bPix>>>20) & 0xFF0)*norm)>>16;
  @@ -848,11 +862,7 @@
               }
   
               if (top_weight != 0) {
  -                int tPix;
  -                if (isSimpleLookup)
  -                    tPix = gradient[fastGradientArraySize];
  -                else 
  -                    tPix = gradients[gradients.length-1][GRADIENT_SIZE_INDEX];
  +                int tPix = gradientOverflow;
   
                   norm = (int)((1<<16)*top_weight);
                   pA += (((tPix>>>20) & 0xFF0)*norm)>>16;
  
  
  
  1.6       +26 -12    xml-batik/sources/org/apache/batik/ext/awt/RadialGradientPaintContext.java
  
  Index: RadialGradientPaintContext.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/ext/awt/RadialGradientPaintContext.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RadialGradientPaintContext.java	2001/07/12 15:07:48	1.5
  +++ RadialGradientPaintContext.java	2001/09/13 21:55:52	1.6
  @@ -21,7 +21,7 @@
    *
    * @author Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans
    * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  - * @version $Id: RadialGradientPaintContext.java,v 1.5 2001/07/12 15:07:48 deweese Exp $
  + * @version $Id: RadialGradientPaintContext.java,v 1.6 2001/09/13 21:55:52 deweese Exp $
    *
    */
   final class RadialGradientPaintContext extends MultipleGradientPaintContext {  
  @@ -130,7 +130,6 @@
           focusY = fy;
           radius = r;
   
  -
           this.isSimpleFocus = (focusX == centerX) && (focusY == centerY);
           this.isNonCyclic = (cycleMethod == RadialGradientPaint.NO_CYCLE);
   	
  @@ -240,9 +239,9 @@
                                                              int adjust, 
                                                              int x, int y, 
                                                              int w, int h) {
  -        float iSq;  // Square distance index
  +        float iSq=0;  // Square distance index
           final float indexFactor = fastGradientArraySize / radius;      
  -	
  +
           //constant part of X and Y coordinates for the entire raster
           final float constX = (a00*x) + (a01*y) + constA;
           final float constY = (a10*x) + (a11*y) + constB;
  @@ -258,6 +257,23 @@
           int end, j; //indexing variables
           int indexer = off;//used to index pixels array
   
  +        temp        = ((deltaX * deltaX) + (deltaY * deltaY));
  +        gDeltaDelta = ((temp * 2));
  +
  +        if (temp > fixedArraySizeSq) {
  +            // This combination of scale and circle radius means
  +            // essentially no pixels will be anything but the end
  +            // stop color.  This also avoids math problems.
  +            final int val = gradientOverflow;
  +            for(j = 0; j < h; j++){ //for every row
  +                //for every column (inner loop begins here)
  +                for (end = indexer+w; indexer < end; indexer++) 
  +                    pixels[indexer] = val;
  +                indexer += adjust;
  +            }
  +            return;
  +        }
  +
           // For every point in the raster, calculate the color at that point
           for(j = 0; j < h; j++){ //for every row
               //x and y (in user space) of the first pixel of this row
  @@ -266,25 +282,23 @@
   
               // these values below here allow for an incremental calculation
               // of dX^2 + dY^2 
  -            temp = ((deltaX * deltaX) + (deltaY * deltaY));
   
               //initialize to be equal to distance squared
               g = (((dY * dY) + (dX * dX)) );
               gDelta =  (((((deltaY * dY) + (deltaX * dX))* 2) + 
                           temp));	 
  -            gDeltaDelta = ((temp * 2));
   	    
               //for every column (inner loop begins here)
               for (end = indexer+w; indexer < end; indexer++) {	       
                   //determine the distance to the center
   		
                   //since this is a non cyclic fill raster, crop at "1" and 0
  -                if (g > fixedArraySizeSq) {
  -                    gIndex = fastGradientArraySize;
  +                if (g >= fixedArraySizeSq) {
  +                    pixels[indexer] = gradientOverflow;
                   }
   		
                   // This should not happen as gIndex is a square
  -                // quantity. Code commented out on purpose
  +                // quantity. Code commented out on purpose, can't underflow.
                   // else if (g < 0) {
                   //    gIndex = 0;		    
                   // }
  @@ -294,11 +308,11 @@
                       
                       iSqInt = (int)iSq; //chop off fractional part
                       iSq -= iSqInt;		    
  -                    gIndex = (int)((iSq * sqrtLutFixed[iSqInt + 1]) + 
  -                                   ((1-iSq) * sqrtLutFixed[iSqInt]));
  +                    gIndex = sqrtLutFixed[iSqInt];
  +                    gIndex += (int)(iSq * (sqrtLutFixed[iSqInt + 1]-gIndex));
  +                    pixels[indexer] = gradient[gIndex]; 
                   }
   		
  -                pixels[indexer] = gradient[gIndex]; 
   				
                   //incremental calculation
                   g += gDelta;
  
  
  

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