deweese 2003/03/04 04:12:00 Modified: resources/org/apache/batik/transcoder/image/resources Messages.properties samples/tests/spec/structure useTargets.svg useTargets2.svg samples/tests/spec/text textFeatures.svg textOnPath2.svg sources/org/apache/batik/apps/svgbrowser JSVGViewerFrame.java sources/org/apache/batik/bridge PaintServer.java SVGUseElementBridge.java sources/org/apache/batik/css/engine CSSEngine.java sources/org/apache/batik/css/engine/value/svg BaselineShiftManager.java sources/org/apache/batik/gvt MarkerShapePainter.java sources/org/apache/batik/gvt/font AWTGVTGlyphVector.java sources/org/apache/batik/gvt/renderer StrokingTextPainter.java sources/org/apache/batik/gvt/text GlyphLayout.java sources/org/apache/batik/swing/gvt JGVTComponent.java sources/org/apache/batik/transcoder SVGAbstractTranscoder.java test-resources/org/apache/batik/test samplesRendering.xml xdocs book.xml site-book.xml status.xml Added: samples/tests/spec/painting stroke-rendering.svg samples/tests/spec/text textOnPath3.svg xdocs cvs.xml Log: Fixed Bugzilla bugs: 12389 [EMAIL PROTECTED] NEW Focus issue in Squiggle's URL text field 12121 [EMAIL PROTECTED] NEW Cursor in URL field disappers 12168 [EMAIL PROTECTED] NEW MarkerShapePainter delivers wrong PaintedArea 12239 [EMAIL PROTECTED] NEW [PATCH] Moved some method local variables into class 12954 [EMAIL PROTECTED] NEW add support for stroke-width:0 15162 [EMAIL PROTECTED] NEW PNGTranscoder gives error message about TIFF transcoder 17167 [EMAIL PROTECTED] NEW stroke-dashoffset does not support negative length 13713 [EMAIL PROTECTED] NEW <use> element fails when using percentage values x/y coords 17183 [EMAIL PROTECTED] NEW baseline-shift doesn't refer to parent "line-height" 15063 [EMAIL PROTECTED] NEW Version-dependent code in package org.apache.batik.gvt.font Revision Changes Path 1.4 +1 -1 xml-batik/resources/org/apache/batik/transcoder/image/resources/Messages.properties Index: Messages.properties =================================================================== RCS file: /home/cvs/xml-batik/resources/org/apache/batik/transcoder/image/resources/Messages.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Messages.properties 16 May 2001 12:32:50 -0000 1.3 +++ Messages.properties 4 Mar 2003 12:11:56 -0000 1.4 @@ -23,5 +23,5 @@ png.badoutput = \ Invalid output. PNG transcoder only supports a byte stream output -png.badoutput = \ +tiff.badoutput = \ Invalid output. TIFF transcoder only supports a byte stream output 1.1 xml-batik/samples/tests/spec/painting/stroke-rendering.svg Index: stroke-rendering.svg =================================================================== <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- Test 'shape-rendering' property --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: stroke-rendering.svg,v 1.1 2003/03/04 12:11:56 deweese Exp $ --> <!-- ====================================================================== --> <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> <svg id="body" width="450" height="500" viewBox="0 0 450 500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Test the 'shape-rendering' property</title> <!-- ============================================================= --> <!-- Test content --> <!-- ============================================================= --> <g id="testContent"> <text x="225" y="50" class="title">Test the 'stroke-dashoffset' property</text> <g style="fill:gold;stroke:orange;stroke-width:8"> <circle cx="120" cy="140" r="40" stroke-width="0"/> <circle cx="300" cy="140" r="40" stroke-dasharray="10,10"/> <circle cx="120" cy="290" r="40" stroke-dasharray="10,10" stroke-dashoffset="-15"/> <circle cx="300" cy="290" r="40" stroke-dasharray="10" stroke-dashoffset="-25"/> <circle cx="210" cy="420" r="40" stroke-dasharray="10,10" stroke-dashoffset="25"/> </g> <g style="font-size:11;fill:black;stroke:none;text-anchor:middle"> <text x="120" y="204">stroke-width='0'</text> <text x="300" y="204">stroke-dasharray="10,10"</text> <text x="120" y="354">stroke-dashoffset="-15"</text> <text x="300" y="354">stroke-dashoffset="-25"</text> <text x="210" y="484">stroke-dashoffset="25"</text> </g> </g> <!-- ============================================================= --> <!-- Batik sample mark --> <!-- ============================================================= --> <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> </svg> 1.6 +13 -13 xml-batik/samples/tests/spec/structure/useTargets.svg Index: useTargets.svg =================================================================== RCS file: /home/cvs/xml-batik/samples/tests/spec/structure/useTargets.svg,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- useTargets.svg 6 Feb 2002 17:26:29 -0000 1.5 +++ useTargets.svg 4 Mar 2003 12:11:56 -0000 1.6 @@ -2,20 +2,20 @@ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- ========================================================================= --> -<!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> -<!-- --> -<!-- This software is published under the terms of the Apache Software License --> -<!-- version 1.1, a copy of which has been included with this distribution in --> -<!-- the LICENSE file. --> -<!-- ========================================================================= --> +<!-- ====================================================================== --> +<!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> +<!-- --> +<!-- This software is published under the terms of the Apache Software --> +<!-- License version 1.1, a copy of which has been included with this --> +<!-- distribution in the LICENSE file. --> +<!-- ====================================================================== --> -<!-- ========================================================================= --> -<!-- Alternate stylesheets --> -<!-- --> -<!-- @author [EMAIL PROTECTED] --> +<!-- ====================================================================== --> +<!-- Alternate stylesheets --> +<!-- --> +<!-- @author [EMAIL PROTECTED] --> <!-- @version $Id$ --> -<!-- ========================================================================= --> +<!-- ====================================================================== --> <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> 1.2 +119 -62 xml-batik/samples/tests/spec/structure/useTargets2.svg Index: useTargets2.svg =================================================================== RCS file: /home/cvs/xml-batik/samples/tests/spec/structure/useTargets2.svg,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- useTargets2.svg 7 Feb 2002 12:44:52 -0000 1.1 +++ useTargets2.svg 4 Mar 2003 12:11:56 -0000 1.2 @@ -2,60 +2,73 @@ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- ========================================================================= --> -<!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> -<!-- --> -<!-- This software is published under the terms of the Apache Software License --> -<!-- version 1.1, a copy of which has been included with this distribution in --> -<!-- the LICENSE file. --> -<!-- ========================================================================= --> - -<!-- ========================================================================= --> -<!-- use targets --> -<!-- --> -<!-- @author [EMAIL PROTECTED] --> +<!-- ====================================================================== --> +<!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> +<!-- --> +<!-- This software is published under the terms of the Apache Software --> +<!-- License version 1.1, a copy of which has been included with this --> +<!-- distribution in the LICENSE file. --> +<!-- ====================================================================== --> + +<!-- ====================================================================== --> +<!-- use targets --> +<!-- --> +<!-- @author [EMAIL PROTECTED] --> <!-- @version $Id$ --> -<!-- ========================================================================= --> +<!-- ====================================================================== --> <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" - width="450" height="500" viewBox="0 0 450 500"> +<svg width="450" height="500" viewBox="0 0 450 500" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink"> <title><use> Targets2</title> <!-- ============================================================= --> <!-- Test content --> <!-- ============================================================= --> - <text x="225" y="50" class="title"><use> Targets 2</text> - <g id="testContent" transform="translate(0 40)"> + <text x="225" y="25" class="title"><use> Targets 2</text> + <g id="testContent" transform="translate(0 0)"> -<defs> - -<symbol id="symbol" viewBox="-100 -100 200 200" style="stroke:crimson; stroke-width:8"> - <rect x="-100" y="-100" width="100%" height="100%" style="fill:crimson; stroke:none"/> - <circle cx="0" cy="0" r="25%" style="fill:orange; stroke:gold"/> -</symbol> - -<svg id="svg" viewBox="-100 -100 200 200" style="stroke:crimson; stroke-width:8"> - <rect x="-100" y="-100" width="100%" height="100%" style="fill:crimson; stroke:none"/> - <circle cx="0" cy="0" r="25%" style="fill:orange; stroke:gold"/> -</svg> - -</defs> - -<g id="board"> -<rect x="10" y="60" width="430" height="20" style="fill:#aaa; stroke:black" /> -<rect x="10" y="80" width="430" height="100" style="fill:#eee; stroke:black" /> -<text x="20" y="74"><use> references a <symbol></text> - -<g transform="translate(0 150)"> -<rect x="10" y="60" width="430" height="20" style="fill:#aaa; stroke:black" /> -<rect x="10" y="80" width="430" height="100" style="fill:#eee; stroke:black" /> -<text x="20" y="74"><use> references a <svg></text> -</g> - -</g> + <defs> + <symbol id="symbol" viewBox="-100 -100 200 200" + style="stroke:crimson; stroke-width:8"> + <rect x="-100" y="-100" width="100%" height="100%" + style="fill:crimson; stroke:none"/> + <circle cx="0" cy="0" r="25%" style="fill:orange; stroke:gold"/> + </symbol> + + <svg id="svg" viewBox="-100 -100 200 200" + style="stroke:crimson; stroke-width:8"> + <rect x="-100" y="-100" width="100%" height="100%" + style="fill:crimson; stroke:none"/> + <circle cx="0" cy="0" r="25%" style="fill:orange; stroke:gold"/> + </svg> + </defs> + + <g id="board"> + <rect x="10" y="60" width="430" height="20" + style="fill:#aaa; stroke:black" /> + <rect x="10" y="80" width="430" height="100" + style="fill:#eee; stroke:black" /> + <text x="20" y="74"><use> references a <symbol></text> + + <g transform="translate(0 140)"> + <rect x="10" y="60" width="430" height="20" + style="fill:#aaa; stroke:black" /> + <rect x="10" y="80" width="430" height="100" + style="fill:#eee; stroke:black" /> + <text x="20" y="74"><use> references a <svg></text> + </g> + <g transform="translate(0 280)"> + <rect x="10" y="60" width="430" height="20" + style="fill:#aaa; stroke:black" /> + <rect x="10" y="80" width="430" height="100" + style="fill:#eee; stroke:black" /> + <text x="20" y="74"><use> references with percentages</text> + </g> + </g> <!-- ################################################### --> <!-- use references symbol --> @@ -65,23 +78,26 @@ <use x="1000" y="1000" width="100" height="100" xlink:href="#symbol" transform="translate(50 100) scale(.5) translate(-1000 -1000)"/> <rect x="48" y="98" width="4" height="4" style="fill:blue" /> -<text x="75" y="170" style="text-anchor:middle">x, y, w, h, transform</text> +<text x="75" y="162" style="text-anchor:middle" + >x, y, w, h,<tspan x="75" dy="1.0em">transform</tspan></text> <!-- svg width transform --> <g transform="translate(150 0)"> - <use width="100" height="100" xlink:href="#symbol" - transform="translate(50 100) scale(.5)"/> - <rect x="48" y="98" width="4" height="4" style="fill:blue" /> - <text x="75" y="170" style="text-anchor:middle">w, h, transform</text> + <use width="100" height="100" xlink:href="#symbol" + transform="translate(50 100) scale(.5)"/> + <rect x="48" y="98" width="4" height="4" style="fill:blue" /> + <text x="75" y="170" style="text-anchor:middle">w, h, transform</text> </g> <!-- equivalent svg --> <g transform="translate(300 0)"> <g transform="translate(50 100) scale(.5) translate(-1000 -1000) translate(1000 1000)"> - <svg width="100" height="100" viewBox="-100 -100 200 200" style="stroke:crimson; stroke-width:8"> - <rect x="-100" y="-100" width="100%" height="100%" style="fill:crimson; stroke:none"/> - <circle cx="0" cy="0" r="25%" style="fill:orange; stroke:gold"/> - </svg> + <svg width="100" height="100" viewBox="-100 -100 200 200" + style="stroke:crimson; stroke-width:8"> + <rect x="-100" y="-100" width="100%" height="100%" + style="fill:crimson; stroke:none"/> + <circle cx="0" cy="0" r="25%" style="fill:orange; stroke:gold"/> + </svg> </g> <rect x="48" y="98" width="4" height="4" style="fill:blue" /> <text x="75" y="170" style="text-anchor:middle">equivalent svg</text> @@ -92,15 +108,16 @@ <!-- ################################################### --> <!-- svg width x,y and transform --> -<g transform="translate(0 150)"> +<g transform="translate(0 140)"> <use x="1000" y="1000" width="100" height="100" xlink:href="#svg" transform="translate(50 100) scale(.5) translate(-1000 -1000)"/> <rect x="48" y="98" width="4" height="4" style="fill:blue" /> - <text x="75" y="170" style="text-anchor:middle">x, y, w, h, transform</text> + <text x="75" y="162" style="text-anchor:middle" + >x, y, w, h,<tspan x="75" dy="1.0em">transform</tspan></text> </g> <!-- svg width transform --> -<g transform="translate(150 150)"> +<g transform="translate(150 140)"> <use width="100" height="100" xlink:href="#svg" transform="translate(50 100) scale(.5)"/> <rect x="48" y="98" width="4" height="4" style="fill:blue" /> @@ -108,18 +125,58 @@ </g> <!-- equivalent svg --> -<g transform="translate(300 150)"> +<g transform="translate(300 140)"> <g transform="translate(50 100) scale(.5) translate(-1000 -1000) translate(1000 1000)"> - <svg width="100" height="100" viewBox="-100 -100 200 200" style="stroke:crimson; stroke-width:8"> - <rect x="-100" y="-100" width="100%" height="100%" style="fill:crimson; stroke:none"/> - <circle cx="0" cy="0" r="25%" style="fill:orange; stroke:gold"/> - </svg> + <svg width="100" height="100" viewBox="-100 -100 200 200" + style="stroke:crimson; stroke-width:8"> + <rect x="-100" y="-100" width="100%" height="100%" + style="fill:crimson; stroke:none"/> + <circle cx="0" cy="0" r="25%" style="fill:orange; stroke:gold"/> + </svg> </g> <rect x="48" y="98" width="4" height="4" style="fill:blue" /> <text x="75" y="170" style="text-anchor:middle">equivalent svg</text> </g> - </g> +<!-- ################################################### --> +<!-- use references with percentages --> +<!-- ################################################### --> + +<!-- svg width, height, x,y percentages --> +<g transform="translate(-10 280)"> + <use x="11.1111%" y="20%" width="11.1111%" height="10%" + xlink:href="#svg"/> + <rect x="48" y="98" width="4" height="4" style="fill:blue" /> + <text x="75" y="162" style="text-anchor:middle" + >referencing svg<tspan x="75" dy="1.0em">x, y, w, h%</tspan></text> +</g> + +<!-- svg width transform --> +<g transform="translate(95 280)"> + <use x="50" y="100" width="11.1111%" height="10%" xlink:href="#svg" /> + <rect x="48" y="98" width="4" height="4" style="fill:blue" /> + <text x="75" y="162" style="text-anchor:middle" + >referencing svg<tspan x="75" dy="1.0em">w, h%</tspan></text> +</g> + +<!-- symbol width, height, x, y, percentages --> +<g transform="translate(200 280)"> + <use x="11.1111%" y="20%" width="11.1111%" height="10%" + xlink:href="#symbol" /> + <rect x="48" y="98" width="4" height="4" style="fill:blue" /> + <text x="75" y="162" style="text-anchor:middle" + >referencing symbol<tspan x="75" dy="1.0em">w, h%</tspan></text> +</g> + +<!-- symbol width, height, percentages --> +<g transform="translate(305 280)"> + <use x="50" y="100" width="11.1111%" height="10%" xlink:href="#symbol" /> + <rect x="48" y="98" width="4" height="4" style="fill:blue" /> + <text x="75" y="162" style="text-anchor:middle" + >referencing symbol<tspan x="75" dy="1.0em">w, h%</tspan></text> +</g> + + </g> <!-- ============================================================= --> <!-- Batik sample mark --> 1.4 +13 -9 xml-batik/samples/tests/spec/text/textFeatures.svg Index: textFeatures.svg =================================================================== RCS file: /home/cvs/xml-batik/samples/tests/spec/text/textFeatures.svg,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- textFeatures.svg 14 Mar 2002 10:56:30 -0000 1.3 +++ textFeatures.svg 4 Mar 2003 12:11:57 -0000 1.4 @@ -60,10 +60,14 @@ </text> <text x="10%" y="60%"> <tspan text-decoration="line-through">strikethrough.</tspan> -<!-- <tspan baseline-shift="super"> Super</tspan>- and- - <tspan baseline-shift="sub">sub</tspan>-scripts are available.--> - </text> - <text x="10%" y="70%" stroke-linecap="round" stroke-linejoin="round"> + <tspan baseline-shift="super" font-size="75%">super</tspan>-and- + <tspan baseline-shift="sub" font-size="75%">sub</tspan>-scripts + are available.</text> + <text x="10%" y="65%">Baseline can also be shifted + <tspan baseline-shift="50%" font-size="75%">up</tspan> and + <tspan baseline-shift="-50%" font-size="75%">down</tspan> + by percentage.</text> + <text x="10%" y="75%" stroke-linecap="round" stroke-linejoin="round"> Various <tspan stroke="red" fill="none" stroke-width="0.5">outline </tspan>styles, @@ -72,16 +76,16 @@ <tspan stroke="red" stroke-width="1" fill="blue" >thicknesses </tspan>can be </text> - <text x="10%" y="75%">used, and the outline stroke can be + <text x="10%" y="80%">used, and the outline stroke can be <tspan stroke="black" fill="none" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round">rounded</tspan> or <tspan stroke="black" fill="none" stroke-width="0.5" stroke-linecap="square" stroke-linejoin="miter">mitered.</tspan> </text> - <text x="10%" y="85%">Text elements also can be</text> - <text x="10%" y="90%">filtered and transformed.</text> - <g font-size="40" transform="translate(250, 450)"> + <text x="10%" y="90%">Text elements also can be</text> + <text x="10%" y="95%">filtered and transformed.</text> + <g font-size="40" transform="translate(250, 475)"> <text x="0" y="0" filter="url(#blur)" fill="black" opacity="0.7" transform="skewX(40) translate(-6,-6)"> Shadow 1.2 +7 -9 xml-batik/samples/tests/spec/text/textOnPath2.svg Index: textOnPath2.svg =================================================================== RCS file: /home/cvs/xml-batik/samples/tests/spec/text/textOnPath2.svg,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- textOnPath2.svg 2 May 2002 19:05:44 -0000 1.1 +++ textOnPath2.svg 4 Mar 2003 12:11:57 -0000 1.2 @@ -35,11 +35,13 @@ <rect fill="white" stroke="black" x="30" y="360" width="390" height="120"/> <text x="40" y="354" fill="white" font-size="14" >textPath with startOffset and text-anchor</text> - - <g transform="translate(40, 185)" > + <defs> <path id="path" style="fill:none; stroke:blue;" d="M100 0 c0 -125 140 -125 140 0"/> - + </defs> + + <g transform="translate(40, 185)" > + <use xlink:href="#path"/> <text x="10" y="0" fill="black">This is simple<textPath fill="crimson" xlink:href="#path" startOffset="0%" >text on a path<tspan fill="orange" dy="-10" @@ -51,9 +53,7 @@ <g transform="translate(40, 330)" > - <path id="path" style="fill:none; stroke:blue;" - d="M100 0 c0 -125 140 -125 140 0"/> - + <use xlink:href="#path"/> <text x="10" y="0" fill="black">This is simple<textPath fill="crimson" xlink:href="#path" startOffset="10%" >text on a path<tspan fill="orange" dy="-10" @@ -64,9 +64,7 @@ </g> <g transform="translate(40, 475)" > - <path id="path" style="fill:none; stroke:blue;" - d="M100 0 c0 -125 140 -125 140 0"/> - + <use xlink:href="#path"/> <text x="10" y="0" fill="black">This is simple<textPath fill="crimson" xlink:href="#path" startOffset="75%" text-anchor="middle" 1.1 xml-batik/samples/tests/spec/text/textOnPath3.svg Index: textOnPath3.svg =================================================================== <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500" viewBox="0 0 450 500"> <title>Text on Path with for text with an 'x'</title> <text class="title" x="50%" y="40" >Text on Path with for text with an 'x'</text> <defs> <path id="path" style="fill:none; stroke:blue;" d="M100 0 c0 -125 140 -125 140 0"/> </defs> <g transform="translate(40, 185)" > <rect fill="black" stroke="black" x="-10" y="-135" width="390" height="20"/> <rect fill="white" stroke="black" x="-10" y="-115" width="390" height="120"/> <text x="-10" y="-120" fill="white" font-size="14" >Text with one textPath child and x="10"</text> <use xlink:href="#path" /> <text x="10" y="0" fill="black"><textPath fill="crimson" xlink:href="#path" startOffset="50%" text-anchor="middle">Text on a path for text w/ 'x'.</textPath ></text> </g> <g transform="translate(40, 330)" > <rect fill="black" stroke="black" x="-10" y="-135" width="390" height="20"/> <rect fill="white" stroke="black" x="-10" y="-115" width="390" height="120"/> <text x="-10" y="-120" fill="white" font-size="14" >Text with one textPath child and x="100"</text> <use xlink:href="#path" /> <text x="100" y="0" fill="black"><textPath fill="crimson" xlink:href="#path" startOffset="50%" text-anchor="middle">Text on a path for text w/ 'x'.</textPath ></text> </g> <g transform="translate(40, 475)" > <rect fill="black" stroke="black" x="-10" y="-135" width="390" height="20"/> <rect fill="white" stroke="black" x="-10" y="-115" width="390" height="120"/> <text x="-10" y="-120" fill="white" font-size="14" >Text with one textPath child and x="-100" y="10"</text> <use xlink:href="#path" /> <text x="-100" y="10" fill="black"><textPath fill="crimson" xlink:href="#path" startOffset="50%" text-anchor="middle">Text on a path for text w/ 'x'.</textPath ></text> </g> </svg> 1.90 +2 -1 xml-batik/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java Index: JSVGViewerFrame.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java,v retrieving revision 1.89 retrieving revision 1.90 diff -u -r1.89 -r1.90 --- JSVGViewerFrame.java 20 Nov 2002 10:31:32 -0000 1.89 +++ JSVGViewerFrame.java 4 Mar 2003 12:11:57 -0000 1.90 @@ -1892,6 +1892,7 @@ svgCanvas.setCursor(DEFAULT_CURSOR); svgCanvas.setSelectionOverlayXORMode (application.isSelectionOverlayXORMode()); + svgCanvas.requestFocus(); // request focus when load completes. if (autoAdjust) { pack(); } 1.8 +24 -1 xml-batik/sources/org/apache/batik/bridge/PaintServer.java Index: PaintServer.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/PaintServer.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PaintServer.java 19 Aug 2002 15:38:52 -0000 1.7 +++ PaintServer.java 4 Mar 2003 12:11:57 -0000 1.8 @@ -455,6 +455,9 @@ v = CSSUtilities.getComputedStyle (e, SVGCSSEngine.STROKE_WIDTH_INDEX); float width = v.getFloatValue(); + if (width == 0.0f) + return null; // Stop here no stroke should be painted. + v = CSSUtilities.getComputedStyle (e, SVGCSSEngine.STROKE_LINECAP_INDEX); int linecap = convertStrokeLinecap(v); @@ -473,6 +476,26 @@ v = CSSUtilities.getComputedStyle (e, SVGCSSEngine.STROKE_DASHOFFSET_INDEX); dashoffset = v.getFloatValue(); + + // make the dashoffset positive since BasicStroke cannot handle + // negative values + if ( dashoffset < 0 ) { + float dashpatternlength = 0; + for ( int i=0; i<dasharray.length; i++ ) { + dashpatternlength += dasharray[i]; + } + // if the dash pattern consists of an odd number of elements, + // the pattern length must be doubled + if ( (dasharray.length % 2) != 0 ) + dashpatternlength *= 2; + + if (dashpatternlength ==0) { + dashoffset=0; + } else { + while (dashoffset < 0) + dashoffset += dashpatternlength; + } + } } return new BasicStroke(width, linecap, 1.28 +4 -4 xml-batik/sources/org/apache/batik/bridge/SVGUseElementBridge.java Index: SVGUseElementBridge.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGUseElementBridge.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- SVGUseElementBridge.java 14 Nov 2002 14:57:14 -0000 1.27 +++ SVGUseElementBridge.java 4 Mar 2003 12:11:57 -0000 1.28 @@ -153,7 +153,7 @@ CompositeGraphicsNode gn = new CompositeGraphicsNode(); gn.getChildren().add(refNode); - gn.setTransform(computeTransform(e)); + gn.setTransform(computeTransform(e, ctx)); // set an affine transform to take into account the (x, y) // coordinates of the <use> element @@ -172,7 +172,7 @@ /** * Computes the AffineTransform for the node */ - protected AffineTransform computeTransform(Element e) { + protected AffineTransform computeTransform(Element e, BridgeContext ctx) { UnitProcessor.Context uctx = UnitProcessor.createContext(ctx, e); // 'x' attribute - default is 0 @@ -280,7 +280,7 @@ attrName.equals(SVG_Y_ATTRIBUTE) || attrName.equals(SVG_TRANSFORM_ATTRIBUTE)) { String s = evt.getNewValue(); - node.setTransform(computeTransform(e)); + node.setTransform(computeTransform(e, ctx)); handleGeometryChanged(); } } 1.18 +10 -3 xml-batik/sources/org/apache/batik/css/engine/CSSEngine.java Index: CSSEngine.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/css/engine/CSSEngine.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- CSSEngine.java 14 Aug 2002 14:12:21 -0000 1.17 +++ CSSEngine.java 4 Mar 2003 12:11:57 -0000 1.18 @@ -958,14 +958,21 @@ * @param uri The base URI. */ public void parseStyleSheet(StyleSheet ss, URL uri) throws DOMException { + if (uri == null) { + String s = Messages.formatMessage("syntax.error.at", + new Object[] { "Null Document reference", + "" }); + throw new DOMException(DOMException.SYNTAX_ERR, s); + } + try { // Check that access to the uri is allowed ParsedURL pDocURL = null; if (documentURI != null) { pDocURL = new ParsedURL(documentURI); } - - ParsedURL pURL = new ParsedURL(uri); + ParsedURL pURL = null; + pURL = new ParsedURL(uri); cssContext.checkLoadExternalResource(pURL, pDocURL); parseStyleSheet(ss, new InputSource(uri.toString()), uri); 1.2 +10 -2 xml-batik/sources/org/apache/batik/css/engine/value/svg/BaselineShiftManager.java Index: BaselineShiftManager.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/css/engine/value/svg/BaselineShiftManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- BaselineShiftManager.java 18 Mar 2002 10:28:23 -0000 1.1 +++ BaselineShiftManager.java 4 Mar 2003 12:11:57 -0000 1.2 @@ -115,7 +115,15 @@ sm.putLineHeightRelative(idx, true); int fsi = engine.getLineHeightIndex(); - Value fs = engine.getComputedStyle(elt, pseudo, fsi); + CSSStylableElement parent; + parent = (CSSStylableElement)elt.getParentNode(); + if (parent == null) { + // Hmmm somthing pretty odd - can't happen accordint to spec, + // should always have text parent. + // http://www.w3.org/TR/SVG11/text.html#BaselineShiftProperty + parent = elt; + } + Value fs = engine.getComputedStyle(parent, pseudo, fsi); float fsv = fs.getFloatValue(); float v = value.getFloatValue(); return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, 1.10 +2 -2 xml-batik/sources/org/apache/batik/gvt/MarkerShapePainter.java Index: MarkerShapePainter.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/MarkerShapePainter.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- MarkerShapePainter.java 2 Dec 2002 13:02:39 -0000 1.9 +++ MarkerShapePainter.java 4 Mar 2003 12:11:57 -0000 1.10 @@ -123,7 +123,7 @@ if (markerGroup == null) { buildMarkerGroup(); } - return markerGroup.getBounds(); + return markerGroup.getOutline(); } /** 1.20 +2 -2 xml-batik/sources/org/apache/batik/gvt/font/AWTGVTGlyphVector.java Index: AWTGVTGlyphVector.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/font/AWTGVTGlyphVector.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- AWTGVTGlyphVector.java 12 Aug 2002 20:34:34 -0000 1.19 +++ AWTGVTGlyphVector.java 4 Mar 2003 12:11:57 -0000 1.20 @@ -477,7 +477,7 @@ private static final boolean outlinesPositioned; static { - String s = System.getProperty("java.version"); + String s = System.getProperty("java.specification.version"); if ("1.4".compareTo(s) <= 0) { outlinesPositioned = true; } else if ("Mac OS X".equals(System.getProperty("os.name"))) { 1.42 +12 -11 xml-batik/sources/org/apache/batik/gvt/renderer/StrokingTextPainter.java Index: StrokingTextPainter.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/renderer/StrokingTextPainter.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- StrokingTextPainter.java 13 Nov 2002 20:20:47 -0000 1.41 +++ StrokingTextPainter.java 4 Mar 2003 12:11:58 -0000 1.42 @@ -555,6 +555,7 @@ char c = aci.setIndex(start+i); GVTFontFamily fontFamily; fontFamily = FontFamilyResolver.getFamilyThatCanDisplay(c); + // fontFamily = (GVTFontFamily)resolvedFontFamilies.get(0); if (runStart == -1) { // Starting a new run... @@ -784,16 +785,16 @@ float tpShiftX = 0; float tpShiftY = 0; - // Of course X and Y override that... - if ((runX != null) && (!runX.isNaN())) { - absX = runX.floatValue(); - tpShiftX = absX; - } - - if ((runY != null) && (!runY.isNaN())) { - absY = runY.floatValue(); - tpShiftY = absY; - } + // Of course X and Y override that, but they don't apply for text on a path. + if ((runX != null) && (!runX.isNaN())) { + absX = runX.floatValue(); + tpShiftX = absX; + } + + if ((runY != null) && (!runY.isNaN())) { + absY = runY.floatValue(); + tpShiftY = absY; + } // Factor in text-anchor in writing direction. // Ignore tpShift in non-writing direction. 1.49 +1 -2 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.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- GlyphLayout.java 20 Feb 2003 11:15:47 -0000 1.48 +++ GlyphLayout.java 4 Mar 2003 12:11:58 -0000 1.49 @@ -1694,7 +1694,6 @@ int currentChar = 0; int lastGlyphDrawn = -1; float lastGlyphAdvance = 0; - // iterate through the GlyphVector placing each glyph for (int i = 0; i < numGlyphs; i++) { 1.32 +2 -2 xml-batik/sources/org/apache/batik/swing/gvt/JGVTComponent.java Index: JGVTComponent.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/swing/gvt/JGVTComponent.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- JGVTComponent.java 26 Feb 2003 11:13:45 -0000 1.31 +++ JGVTComponent.java 4 Mar 2003 12:11:58 -0000 1.32 @@ -962,7 +962,7 @@ * Invoked when the mouse enters a component. */ public void mouseEntered(MouseEvent e) { - requestFocus(); + // requestFocus(); // This would grab focus every time mouse enters! selectInteractor(e); if (interactor != null) { interactor.mouseEntered(e); 1.5 +13 -6 xml-batik/sources/org/apache/batik/transcoder/SVGAbstractTranscoder.java Index: SVGAbstractTranscoder.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/transcoder/SVGAbstractTranscoder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SVGAbstractTranscoder.java 24 Feb 2003 18:25:54 -0000 1.4 +++ SVGAbstractTranscoder.java 4 Mar 2003 12:11:59 -0000 1.5 @@ -89,6 +89,16 @@ protected GraphicsNode root; /** + * Current bridge context + */ + protected BridgeContext ctx; + + /** + * Current gvt builder + */ + protected GVTBuilder builder; + + /** * Image's width and height. */ protected float width, height; @@ -151,12 +161,12 @@ Messages.formatMessage("notsvg", null)); } - BridgeContext ctx = new BridgeContext(userAgent); + ctx = new BridgeContext(userAgent); SVGOMDocument svgDoc = (SVGOMDocument)document; SVGSVGElement root = svgDoc.getRootElement(); // build the GVT tree - GVTBuilder builder = new GVTBuilder(); + builder = new GVTBuilder(); // flag that indicates if the document is dynamic boolean isDynamic = (hints.containsKey(KEY_EXECUTE_ONLOAD) && @@ -173,7 +183,6 @@ // get the 'width' and 'height' attributes of the SVG document float docWidth = (float)ctx.getDocumentSize().getWidth(); float docHeight = (float)ctx.getDocumentSize().getHeight(); - builder = null; setImageSize(docWidth, docHeight); @@ -235,8 +244,6 @@ } catch (BridgeException ex) { throw new TranscoderException(ex); } - ctx = null; - this.root = gvtRoot; } 1.92 +4 -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.91 retrieving revision 1.92 diff -u -r1.91 -r1.92 --- samplesRendering.xml 24 Feb 2003 18:25:54 -0000 1.91 +++ samplesRendering.xml 4 Mar 2003 12:11:59 -0000 1.92 @@ -176,6 +176,7 @@ <test id="samples/tests/spec/painting/markersOrientB.svg" /> <test id="samples/tests/spec/painting/markersPreserveAspectRatio.svg" /> <test id="samples/tests/spec/painting/markersShapes.svg" /> + <test id="samples/tests/spec/painting/stroke-rendering.svg" /> <test id="samples/tests/spec/painting/shape-rendering.svg" /> <test id="samples/tests/spec/painting/text-rendering.svg" /> <test id="samples/tests/spec/painting/text-rendering2.svg" /> @@ -290,6 +291,8 @@ <test id="samples/tests/spec/text/textLayout2.svg" /> <test id="samples/tests/spec/text/textLength.svg" /> <test id="samples/tests/spec/text/textOnPath.svg" /> + <test id="samples/tests/spec/text/textOnPath2.svg" /> + <test id="samples/tests/spec/text/textOnPath3.svg" /> <test id="samples/tests/spec/text/textOnPathSpaces.svg" /> <test id="samples/tests/spec/text/textPCDATA.svg" /> <test id="samples/tests/spec/text/textProperties.svg" /> 1.11 +5 -5 xml-batik/xdocs/book.xml Index: book.xml =================================================================== RCS file: /home/cvs/xml-batik/xdocs/book.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- book.xml 17 Jun 2002 16:28:00 -0000 1.10 +++ book.xml 4 Mar 2003 12:11:59 -0000 1.11 @@ -12,7 +12,7 @@ <!-- author [EMAIL PROTECTED] --> <!-- author [EMAIL PROTECTED] --> <!-- author [EMAIL PROTECTED] --> -<!-- version $Id$ --> +<!-- version $Id$ --> <!-- ========================================================================= --> <book title="Apache Batik documentation" copyright="2000-2002 The Apache Software Foundation"> @@ -30,8 +30,7 @@ <page id="license" label="License" source="license.xml"/> <external label="Download" href="http://xml.apache.org/batik/dist" /> <page id="install" label="Install" source="installing.xml"/> - <!-- <page id="batikDemo" label="Demo" source="batikDemo.xml"/> --> - <external label="Demo" href="batikDemo.html"/> + <page id="batikDemo" label="Demo" source="batikDemo.xml"/> <separator/> <!-- ======================= --> @@ -56,13 +55,14 @@ <!-- Developer's Guides and Tutorials --> <!-- ==================================== --> <page id="architecture" label="Architecture" source="architecture.xml"/> + <external id="javadoc" label="API (Javadoc)" href="javadoc/index.html"/> <page id="svggen" label="Generator" source="svggen.xml" /> <page id="domapi" label="DOM API" source="domTutorial.xml" /> <page id="svgcanvas" label="JSVGCanvas" source="jsvgcanvas.xml" /> <page id="rasterizerTutorial" label="Transcoder API" source="rasterizerTutorial.xml"/> <separator/> <page id="scripting" label="Scripting Intro" source="scriptIntro.xml" /> - <page id="scriptfeatures" label="Scripting Features" source="scriptFeatures.xml" /> + <page id="scriptingFeatures" label="Scripting Features" source="scriptFeatures.xml" /> <page id="javaScripting" label="Java Scripting" source="javaScripting.xml" /> <page id="security" label="Security" source="security.xml" /> <separator /> @@ -81,7 +81,7 @@ <!-- ======================= --> <!-- Admin / Status --> <!-- ======================= --> - <external label="CVS Repository" href="http://cvs.apache.org/viewcvs.cgi/xml-batik/"/> + <page id="cvs" label="CVS Repository" source="cvs.xml"/> <external label="Bug Database" href="http://nagoya.apache.org/bugzilla"/> <separator/> <page id="status" label="Status" source="status.xml" /> 1.34 +2 -2 xml-batik/xdocs/site-book.xml Index: site-book.xml =================================================================== RCS file: /home/cvs/xml-batik/xdocs/site-book.xml,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- site-book.xml 20 Jun 2002 07:44:31 -0000 1.33 +++ site-book.xml 4 Mar 2003 12:11:59 -0000 1.34 @@ -12,7 +12,7 @@ <!-- author [EMAIL PROTECTED] --> <!-- author [EMAIL PROTECTED] --> <!-- author [EMAIL PROTECTED] --> -<!-- version $Id$ --> +<!-- version $Id$ --> <!-- ========================================================================= --> <book title="Apache Batik documentation" copyright="2000-2002 The Apache Software Foundation"> @@ -81,7 +81,7 @@ <!-- ======================= --> <!-- Admin / Status --> <!-- ======================= --> - <external label="CVS Repository" href="http://cvs.apache.org/viewcvs.cgi/xml-batik/"/> + <page id="cvs" label="CVS Repository" source="cvs.xml"/> <external label="Bug Database" href="http://nagoya.apache.org/bugzilla"/> <separator/> <page id="status" label="Status" source="status.xml" /> 1.23 +14 -14 xml-batik/xdocs/status.xml Index: status.xml =================================================================== RCS file: /home/cvs/xml-batik/xdocs/status.xml,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- status.xml 19 Jun 2002 07:02:19 -0000 1.22 +++ status.xml 4 Mar 2003 12:11:59 -0000 1.23 @@ -1,19 +1,19 @@ <?xml version="1.0"?> <!DOCTYPE document SYSTEM "./dtd/document-v10.dtd"> -<!-- ========================================================================= --> -<!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> -<!-- --> -<!-- This software is published under the terms of the Apache Software License --> -<!-- version 1.1, a copy of which has been included with this distribution in --> -<!-- the LICENSE file. --> -<!-- ========================================================================= --> - -<!-- ========================================================================= --> -<!-- author [EMAIL PROTECTED] --> -<!-- author [EMAIL PROTECTED] --> +<!-- ====================================================================== --> +<!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> +<!-- --> +<!-- This software is published under the terms of the Apache Software --> +<!-- License version 1.1, a copy of which has been included with this --> +<!-- distribution in the LICENSE file. --> +<!-- ====================================================================== --> + +<!-- ====================================================================== --> +<!-- author [EMAIL PROTECTED] --> +<!-- author [EMAIL PROTECTED] --> <!-- version $Id$ --> -<!-- ========================================================================= --> +<!-- ====================================================================== --> <document> <header> <title>Batik Status</title> @@ -181,7 +181,7 @@ </table> - <anchor id="DynamicTest" /> + <anchor id="DynamicTest" /> <p><strong>Dynamic Tests Passed by Batik</strong></p> <table> <tr><td>linking-outBound-BE-01.svg</td><td>linking-xlinkAttr-BE-02.svg</td><td>linking-inBound-BE-03.svg</td></tr> 1.1 xml-batik/xdocs/cvs.xml Index: cvs.xml =================================================================== <?xml version="1.0"?> <!DOCTYPE document SYSTEM "./dtd/document-v10.dtd"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- author [EMAIL PROTECTED] --> <!-- author [EMAIL PROTECTED] --> <!-- version $Id: cvs.xml,v 1.1 2003/03/04 12:11:59 deweese Exp $ --> <!-- ====================================================================== --> <document> <header> <title>Batik CVS Repository</title> <subtitle>How to access Batik from CVS</subtitle> <authors> <person name="Thomas DeWeese" email="[EMAIL PROTECTED]" /> </authors> </header> <body> <s1 title="Introduction"> <p> This page provides information about how to access Batik's source code. There are three main ways: </p> <ul> <li>The first and easiest is by downloading a <link href="http://xml.apache.org/batik/dist">source distribution</link>. These are the packages that start with 'batik-src'. </li> <li>The second is through <link href="http://cvs.apache.org/viewcvs.cgi/xml-batik" >viewcvs</link>. This provides the ability to traverse the CVS repository over the web, and check differences between versions. </li> <li>The third is through AnonCVS. Anyone can checkout source code from our anonymous CVS server. To do so, simply use the following commands (if you are using a GUI CVS client, configure it appropriately):<br/> <code>cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic</code><br/> <code>login</code><br/> <code>password: anoncvs</code><br/> <br/> <code>cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic</code><br/> <code>checkout xml-batik</code><br/> </li> </ul> </s1> </body> </document>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]