xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dewe...@apache.org
Subject cvs commit: xml-batik/test-resources/org/apache/batik/test samplesRendering.xml
Date Thu, 20 Jun 2002 21:35:10 GMT
deweese     2002/06/20 14:35:10

  Modified:    .        build.xml
               sources/org/apache/batik/bridge URIResolver.java
               sources/org/apache/batik/ext/awt/image/rendered BumpMap.java
               sources/org/apache/batik/gvt/text GlyphLayout.java
               test-resources/org/apache/batik/test samplesRendering.xml
  Added:       test-references/samples batikCandyBumpMap1.png
  Log:
  1) Changed build target for svgbrowser to squiggle.  Also the jar file
     will now be 'batik-squiggle.jar' not 'batik-svgbrowser.jar'.
  2) Fixed a bug in BupMap.java when the bump map was only one pixle wide/high.
  3) Added a test for this case.
  PR:8333
  
  Revision  Changes    Path
  1.117     +17 -11    xml-batik/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-batik/build.xml,v
  retrieving revision 1.116
  retrieving revision 1.117
  diff -u -r1.116 -r1.117
  --- build.xml	17 Jun 2002 17:06:52 -0000	1.116
  +++ build.xml	20 Jun 2002 21:35:09 -0000	1.117
  @@ -34,8 +34,8 @@
   
   You can now launch the SVG browser by typing:
   
  -  [unix]  ./build.sh svgbrowser
  -  [win32] .\build.bat svgbrowser
  +  [unix]  ./build.sh squiggle
  +  [win32] .\build.bat squiggle
   
   
   Build Targets
  @@ -138,7 +138,8 @@
       <echo message="   dist-tgz      --> build the tgz distributions"/>
       <echo message="   compile       --> compiles the source code"/>
       <echo message="   compiletest   --> compiles the tests source code"/>
  -    <echo message="   svgbrowser    --> runs the SVG browser"/>
  +    <echo message="   squiggle      --> runs Squiggle the SVG browser"/>
  +    <echo message="   svgbrowser    --> runs Squiggle the SVG browser"/>
       <echo message="   svgrasterizer --> runs the SVG rasterizer"/>
       <echo message="   svgpp         --> runs the SVG pretty-printer"/>
       <echo message="   ttf2svg       --> converts selected glyphs from a True Type"/>
  @@ -388,7 +389,7 @@
                                  svg-pp-jar,
                                  svg-slideshow-jar,
                                  svggen-jar,
  -                               svg-browser-jar,
  +                               squiggle-jar,
                                  rasterizer-jar,
                                  ttf2svg-jar">
       <copy todir="${build}/lib">
  @@ -725,14 +726,15 @@
       </jar>
     </target>
   
  -  <!-- SVG Browser (dependencies: all) -->
  -  <target name="svg-browser-jar" depends="compile, prepare-build">
  +
  +  <!-- Squiggle (dependencies: all) -->
  +  <target name="squiggle-jar" depends="compile, prepare-build">
       <move file="${resources}/${package-prefix}/apps/svgbrowser/resources/svgbrowser.policy"
             tofile="${resources}/${package-prefix}/apps/svgbrowser/resources/svgbrowser.classes.policy"
/>
       <move file="${resources}/${package-prefix}/apps/svgbrowser/resources/svgbrowser.bin.policy"
             tofile="${resources}/${package-prefix}/apps/svgbrowser/resources/svgbrowser.policy"
/>
       <jar manifest="${src}/${project}-browser.mf"
  -         jarfile="${build}/${project}-svgbrowser.jar">
  +         jarfile="${build}/${project}-squiggle.jar">
         <fileset dir="${dest}">
           <include name="${package-prefix}/apps/svgbrowser/**/*.class"/>
           <include name="${package-prefix}/experiment/**/*.class"/>
  @@ -749,6 +751,8 @@
             tofile="${resources}/${package-prefix}/apps/svgbrowser/resources/svgbrowser.policy"
/>
     </target>
   
  +  <!-- Squiggle - SVG Browser (dependencies: all) -->
  +  <target name="svg-browser-jar" depends="squiggle-jar"/>
   
     <!-- Rasterizer (dependencies: all except GUI util) -->
     <target name="rasterizer-jar" depends="compile, prepare-build">
  @@ -789,9 +793,8 @@
   
   
     <!-- Applications ....................................................... -->
  -  <target name="svgbrowser"
  -          depends="compile"
  -          description="Runs the SVG browser">
  +  <target name="squiggle" depends="compile"
  +          description="Runs Squiggle - the SVG browser">
       <java fork="yes"
             classname="${class-prefix}.apps.svgbrowser.Main">
         <classpath>
  @@ -809,6 +812,9 @@
         -->
       </java>
     </target>
  +
  +  <target name="svgbrowser" depends="squiggle"
  +          description="Runs Squiggle - the SVG browser"/>
   
     <target name="svgrasterizer"
             depends="compile"
  
  
  
  1.19      +6 -2      xml-batik/sources/org/apache/batik/bridge/URIResolver.java
  
  Index: URIResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/URIResolver.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- URIResolver.java	13 Jun 2002 11:19:37 -0000	1.18
  +++ URIResolver.java	20 Jun 2002 21:35:09 -0000	1.19
  @@ -97,8 +97,12 @@
           String    frag  = purl.getRef();
           if ((frag != null) && (documentURI != null)) {
               ParsedURL pDocURL = new ParsedURL(documentURI);
  -            if (pDocURL.sameFile(purl))
  +            // System.out.println("doc: " + pDocURL);
  +            // System.out.println("Purl: " + purl);
  +            if (pDocURL.sameFile(purl)) {
  +                // System.out.println("match");
                   return document.getElementById(frag);
  +            }
           }
   
           // uri is not a reference into this document, so load the 
  
  
  
  1.2       +81 -2     xml-batik/sources/org/apache/batik/ext/awt/image/rendered/BumpMap.java
  
  Index: BumpMap.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/ext/awt/image/rendered/BumpMap.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BumpMap.java	26 Mar 2001 21:27:35 -0000	1.1
  +++ BumpMap.java	20 Jun 2002 21:35:09 -0000	1.2
  @@ -143,6 +143,72 @@
   
           // Top edge extend filters...
           if (yloc == srcRect.y) {
  +            if (yloc == yEnd) {
  +                // Only one row of pixels...
  +                final double [][] NRow = N[yloc-y];
  +                int xloc=x;
  +                if (xloc < srcRect.x)
  +                    xloc = srcRect.x;
  +                int p  = (offset + (xloc-srcRect.x) + 
  +                          scanStride*(yloc-srcRect.y));
  +
  +                crcc = (pixels[p] >>> 24)*pixelScale;
  +
  +                if (xloc != srcRect.x) {
  +                    crpc = (pixels[p - 1] >>> 24)*pixelScale;
  +                } 
  +                else if (xloc < xEnd) {
  +                    // Top left pixel, in src (0, 0);
  +                    crnc = (pixels[p+1] >>> 24)*pixelScale;
  +
  +                    final double [] n = NRow[xloc-x];
  +        
  +                    n[0] = 2*surfaceScaleX*(crcc - crnc);
  +                    invNorm = 1.0/Math.sqrt(n[0]*n[0] + 1);
  +                    n[0] *= invNorm;
  +                    n[1]  = 0;
  +                    n[2]  = invNorm;
  +                    n[3]  = crcc*surfaceScale;
  +                    p++;
  +                    xloc++;
  +                    crpc = crcc;
  +                    crcc = crnc;
  +                } else {
  +                    // Single pix.
  +                    crpc = crcc;
  +                }
  +
  +                for (; xloc<xEnd; xloc++) {
  +                    // Middle Top row...
  +                    crnc = (pixels[p+1] >>> 24)*pixelScale;
  +                    final double [] n = NRow[xloc-x];
  +
  +                    n[0] = surfaceScaleX * (crpc - crnc );
  +                    invNorm = 1.0/Math.sqrt(n[0]*n[0] + 1);
  +                    n[0] *= invNorm;
  +                    n[1]  = 0;
  +                    n[2]  = invNorm;
  +                    n[3]  = crcc*surfaceScale;
  +                    p++;
  +                    crpc = crcc;
  +                    crcc = crnc;
  +                }
  +
  +                if ((xloc < x+w) && 
  +                    (xloc == srcRect.x+srcRect.width-1)) {
  +                    // Last pixel of top row
  +                    final double [] n = NRow[xloc-x];
  +
  +                    n[0] = 2*surfaceScaleX*(crpc - crcc);
  +                    invNorm = 1.0/Math.sqrt(n[0]*n[0] + n[1]*n[1] + 1);
  +                    n[0] *= invNorm;
  +                    n[1] *= invNorm;
  +                    n[2]  = invNorm;
  +                    n[3]  = crcc*surfaceScale;
  +                }
  +                return N;
  +            }
  +
               final double [][] NRow = N[yloc-y];
               int p  = offset + scanStride*(yloc-srcRect.y);
               int xloc=x;
  @@ -179,6 +245,10 @@
                   nrpc = nrcc;
                   crcc = crnc;
                   nrcc = nrnc;
  +            } else {
  +                // Single pix
  +                crpc = crcc;
  +                nrpc = nrcc;
               }
   
               for (; xloc<xEnd; xloc++) {
  @@ -242,7 +312,7 @@
                   prpc = (pixels[p - scanStridePP] >>> 24)*pixelScale;
                   crpc = (pixels[p - 1] >>> 24)*pixelScale;
                   nrpc = (pixels[p + scanStrideMM] >>> 24)*pixelScale;
  -            }
  +            } 
               else if (xloc < xEnd) {
                   // Now, process left column, from (0, 1) to (0, h-1)
                   crnc = (pixels[p+1] >>> 24)*pixelScale;
  @@ -271,6 +341,11 @@
                   prcc = prnc;
                   crcc = crnc;
                   nrcc = nrnc;
  +            } else {
  +                // Single pix
  +                prpc = prcc;
  +                crpc = crcc;
  +                nrpc = nrcc;
               }
   
               for (; xloc<xEnd; xloc++) {
  @@ -357,6 +432,10 @@
                   prpc = prcc;
                   crcc = crnc;
                   prcc = prnc;
  +            } else {
  +                // Single pix
  +                crpc = crcc;
  +                prpc = prcc;
               }
               
               for (; xloc<xEnd; xloc++) {
  
  
  
  1.43      +1 -3      xml-batik/sources/org/apache/batik/gvt/text/GlyphLayout.java
  
  Index: GlyphLayout.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/text/GlyphLayout.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- GlyphLayout.java	8 May 2002 09:42:47 -0000	1.42
  +++ GlyphLayout.java	20 Jun 2002 21:35:09 -0000	1.43
  @@ -1848,8 +1848,6 @@
       // 
       // Does not properly handle Bi-DI languages (does text wrapping on
       // display order not logical order).
  -    //
  -    // Does not drop leading non-printing chars on a line..
   
       /**
        * This will wrap the text associated with <tt>aci</tt> and
  
  
  
  1.1                  xml-batik/test-references/samples/batikCandyBumpMap1.png
  
  	<<Binary file>>
  
  
  1.77      +3 -1      xml-batik/test-resources/org/apache/batik/test/samplesRendering.xml
  
  Index: samplesRendering.xml
  ===================================================================
  RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/test/samplesRendering.xml,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- samplesRendering.xml	11 Jun 2002 09:59:55 -0000	1.76
  +++ samplesRendering.xml	20 Jun 2002 21:35:09 -0000	1.77
  @@ -104,6 +104,8 @@
           <test id="samples/tests/spec/filters/feTurbulence.svg" />
           <test id="samples/tests/spec/filters/filterRegions.svg" />
           <test id="samples/tests/spec/filters/svgEnableBackground.svg" />
  +        <test id="samples/batikCandy.svg#svgView(transform(scale(0.01)))-BumpMap1" 
  +              class="org.apache.batik.test.svg.SVGReferenceRenderingAccuracyTest"/>
       </testGroup>
   
       <testGroup id="tests.spec.fonts">    
  
  
  

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


Mime
View raw message