tkormann 01/10/17 23:28:47 Modified: samples/tests/resources/svg defs.svg sources/org/apache/batik/bridge UnitProcessor.java Added: samples/tests/spec/structure useStylingURI.svg Log: - bug fix with unit processor (infinite loop with exs et ems) - add new sample Revision Changes Path 1.5 +2 -2 xml-batik/samples/tests/resources/svg/defs.svg Index: defs.svg =================================================================== RCS file: /home/cvs/xml-batik/samples/tests/resources/svg/defs.svg,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- defs.svg 2001/10/15 11:47:27 1.4 +++ defs.svg 2001/10/18 06:28:46 1.5 @@ -14,7 +14,7 @@ <!-- Test description here --> <!-- --> <!-- @author [EMAIL PROTECTED] --> -<!-- @version $Id: defs.svg,v 1.4 2001/10/15 11:47:27 tkormann Exp $ --> +<!-- @version $Id: defs.svg,v 1.5 2001/10/18 06:28:46 tkormann Exp $ --> <!-- ========================================================================= --> <svg width="450" height="500" viewBox="0 0 450 500"> @@ -97,7 +97,7 @@ <circle id="extE1" cx="25" cy="25" r="20" style="fill:url(#extGrad1)" /> - <circle id="extE2" cx="25" cy="25" r="20" style="fill:url(useStylingURI.svg#grad1)" /> + <circle id="extE2" cx="25" cy="25" r="20" style="fill:url(../../spec/structure/useStylingURI.svg#grad1)" /> </g> 1.1 xml-batik/samples/tests/spec/structure/useStylingURI.svg Index: useStylingURI.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 use and styling --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: useStylingURI.svg,v 1.1 2001/10/18 06:28:46 tkormann Exp $ --> <!-- ========================================================================= --> <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> <svg width="450" height="500" viewBox="0 0 450 500"> <title>Test use and styling using URIs</title> <!-- ============================================================= --> <!-- Test content --> <!-- ============================================================= --> <g id="testContent" transform="translate(0 -40)"> <text x="225" y="60" class="title"><use> and styling using URIs</text> <text x="225" y="80" style="text-anchor:middle; font-size:12; font-style:italic">This file is using the defs.svg file to get the external resources</text> <g font-size="10"> <text x="20" y="496">- linearGradient defined in this file (local)</text> <text x="20" y="508">- radialGradient defined in defs.svg (external)</text> <text x="20" y="520">- gold/crimson: gradient on <rect>, white/black: gradient on <use></text> <text x="26" y="532">yellow/green: inherited from <g></text> </g> <!-- ############################### --> <g id="board" style="fill:none; stroke:black;"> <g style="fill:#eee"> <rect x="75" y="100" width="150" height="20" /> <rect x="225" y="100" width="150" height="20" /> <rect x="35" y="120" width="20" height="120" /> <rect x="35" y="240" width="20" height="120" /> <rect x="35" y="360" width="20" height="120" /> </g> <g style="fill:#ccc"> <rect x="55" y="120" width="20" height="60" /> <rect x="55" y="180" width="20" height="60" /> <rect x="55" y="240" width="20" height="60" /> <rect x="55" y="300" width="20" height="60" /> <rect x="55" y="360" width="20" height="60" /> <rect x="55" y="420" width="20" height="60" /> </g> <rect x="75" y="120" width="150" height="360" /> <rect x="225" y="120" width="150" height="360" /> <line x1="75" y1="180" x2="375" y2="180" /> <line x1="75" y1="240" x2="375" y2="240" /> <line x1="75" y1="300" x2="375" y2="300" /> <line x1="75" y1="360" x2="375" y2="360" /> <line x1="75" y1="420" x2="375" y2="420" /> <line x1="75" y1="480" x2="375" y2="480" /> <g style="font-size:12; text-anchor:middle; fill:black; stroke:none"> <text x="150" y="114">Local <use></text> <text x="300" y="114">External <use></text> <text x="0" y="0" transform="translate(50 180) rotate(-90)">internal style on</text> <text x="0" y="0" transform="translate(50 300) rotate(-90)">external style on</text> <text x="0" y="0" transform="translate(50 420) rotate(-90)">inherited style</text> <text x="0" y="0" transform="translate(70 150) rotate(-90)"><rect></text> <text x="0" y="0" transform="translate(70 210) rotate(-90)"><use></text> <text x="0" y="0" transform="translate(70 270) rotate(-90)"><rect></text> <text x="0" y="0" transform="translate(70 330) rotate(-90)"><use></text> <text x="0" y="0" transform="translate(70 390) rotate(-90)">internal</text> <text x="0" y="0" transform="translate(70 450) rotate(-90)">external</text> </g> </g> <!-- ############################### --> <defs> <linearGradient id="grad1"> <stop style="stop-color:gold" offset="0" /> <stop style="stop-color:crimson" offset="1" /> </linearGradient> <linearGradient id="grad2"> <stop style="stop-color:white" offset="0" /> <stop style="stop-color:black" offset="1" /> </linearGradient> <linearGradient id="grad3"> <stop style="stop-color:gold" offset="0" /> <stop style="stop-color:green" offset="1" /> </linearGradient> <g style="fill:black;"> <!-- ### NOTHING SHOULD BE BLACK ON THE SCREEN ### --> <circle id="e" cx="25" cy="25" r="20" /> <circle id="e1" cx="25" cy="25" r="20" style="fill:url(#grad1)" /> <circle id="e3" cx="25" cy="25" r="20" style="fill:url(../../resources/svg/defs.svg#extGrad1)" /> </g> </defs> <!-- ############################### --> <!-- LOCAL USE --> <!-- ############################### --> <g> <!-- fill: internal URI on the referenced element --> <use xlink:href="#e1" x="125" y="125" /> <!-- fill:internal URI on the use --> <use xlink:href="#e" x="125" y="185" style="fill:url(#grad2)"/> <!-- fill: external URI on the referenced element --> <use xlink:href="#e3" x="125" y="245" /> <!-- fill: external URI on the use --> <use xlink:href="#e" x="125" y="305" style="fill:url(../../resources/svg/defs.svg#extGrad2)" /> <g style="fill:url(#grad3)"> <!-- fill: inherited local URI --> <use xlink:href="#e" x="125" y="365" /> </g> <g style="fill:url(../../resources/svg/defs.svg#extGrad3)"> <!-- fill: inherited external URI --> <use xlink:href="#e" x="125" y="425" /> </g> </g> <!-- ############################### --> <!-- EXTERNAL USE --> <!-- ############################### --> <g> <!-- fill: internal URI on the referenced element --> <use xlink:href="../../resources/svg/defs.svg#extE1" x="275" y="125" /> <!-- fill:internal URI on the use --> <use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="185" style="fill:url(#grad2)"/> <!-- fill: external URI on the referenced element --> <use xlink:href="../../resources/svg/defs.svg#extE2" x="275" y="245" /> <!-- fill: external URI on the use --> <use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="305" style="fill:url(../../resources/svg/defs.svg#extGrad2)"/> <!-- fill: inherited local URI --> <g style="fill:url(#grad3)"> <use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="365" /> </g> <!-- fill: inherited external URI --> <g style="fill:url(../../resources/svg/defs.svg#extGrad3)"> <use xlink:href="../../resources/svg/defs.svg#extE" x="275" y="425" /> </g> </g> </g> <!-- ============================================================= --> <!-- Batik sample mark --> <!-- ============================================================= --> <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> </svg> 1.4 +5 -5 xml-batik/sources/org/apache/batik/bridge/UnitProcessor.java Index: UnitProcessor.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/UnitProcessor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- UnitProcessor.java 2001/07/05 06:47:03 1.3 +++ UnitProcessor.java 2001/10/18 06:28:46 1.4 @@ -26,7 +26,7 @@ * * @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a> * @author <a href="mailto:[EMAIL PROTECTED]">Thierry Kormann</a> - * @version $Id: UnitProcessor.java,v 1.3 2001/07/05 06:47:03 bella Exp $ + * @version $Id: UnitProcessor.java,v 1.4 2001/10/18 06:28:46 tkormann Exp $ */ public abstract class UnitProcessor { @@ -709,7 +709,7 @@ ctx); default: return v / cssToUserSpace(fontSize.getFloatValue(type), - type, + CSSPrimitiveValue.CSS_NUMBER, d, ctx); } @@ -735,7 +735,7 @@ ctx); default: return v * cssToUserSpace(fontSize.getFloatValue(type), - type, + CSSPrimitiveValue.CSS_NUMBER, d, ctx); } @@ -763,7 +763,7 @@ break; default: fontSizeVal = cssToUserSpace(fontSize.getFloatValue(type), - type, + CSSPrimitiveValue.CSS_NUMBER, d, ctx); } @@ -793,7 +793,7 @@ break; default: fontSizeVal = cssToUserSpace(fontSize.getFloatValue(type), - type, + CSSPrimitiveValue.CSS_NUMBER, d, ctx); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]