You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by David Eppstein <ep...@ics.uci.edu> on 2003/08/24 02:19:28 UTC

inconsistent display of stroke-dasharray

With Batik 1.5 (both squiggle and rasterizer, binary download, under OS 
X 10.2.6), I am getting inconsistent results when I use SVG code like 
the following:
  <g ... stroke-dasharray="2,4">
      <line ... />
  </g>

Specifically, lines with different slopes within the same <g> group are 
shown with very different visual appearances, some looking like what I 
want, some as if I had done other dasharrays ranging in appearance from 
"2,1" to "4,2".  I.e., I get dashes that are too tightly spaced, dashes 
that are too long, etc.

Is this a known bug?
Is there any workaround?

-- 
David Eppstein                      http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science


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


Re: interperter exception

Posted by Jamie <ja...@exponent.co.uk>.
----- Original Message -----
From: "Thomas DeWeese" <Th...@Kodak.com>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Wednesday, August 27, 2003 12:41 PM
Subject: Re: interperter exception


> Jamie wrote:
> > AFAIO the correct syntax is: text2.getFirstChild(). This is the function
you
> > should use in Adobe; from their CurrentSupport.pdf:
>
>    The correct syntax according to DOM/SVG is 'text2.firstChild' anything
else
> is not compliant.


Yes getFirstChild etc are bridge methods that will only work in Netscape


> BTW you can have your content use the Adobe interpreter with the following
> on the outermost SVG element:
>
>       xmlns:a3="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
>       a3:scriptImplementation="Adobe"
>

But not if you need to communicate with the browser or another SVG file on
the same HTML page :-(


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


Re: interperter exception

Posted by Thomas DeWeese <Th...@Kodak.com>.
Jamie wrote:
> AFAIO the correct syntax is: text2.getFirstChild(). This is the function you
> should use in Adobe; from their CurrentSupport.pdf:

   The correct syntax according to DOM/SVG is 'text2.firstChild' anything else
is not compliant.

> 
> "The script engine interface technology available on Netscape for the
> Macintosh does not support writable attributes on interfaces. To work around
> this limitation, Adobe SVG Viewer supports additional "get/set" methods for
> each DOM interface attribute. For cross-browser script compatibility you
> should always use these methods instead of the writable attributes listed
> below. For example, to read from and write to the attribute nodeValue on the
> Node interface, use the methods getNodeValue and setNodeValue, instead."
> 
> Does this same syntax work in Batik?

     Yes this will work in Batik, but this is _not_ compliant with
the DOM/SVG ecma binding.  Also I would expect that the above referenced
problem is easily solved by using the Adobe script engine rather than
the browser native script engine.

     Admittedly this is also in some sense not compliant with the SVG spec
but one attribute in the Adobe namespace is much less of an issue than
dozens of calls (to be honest I can't think of any way this violates
the DOM/SVG specification - well I suspose they should have used the
Adobe engine and allowed the option of switching to the less compliant
browser engine).

BTW you can have your content use the Adobe interpreter with the following
on the outermost SVG element:

      xmlns:a3="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
      a3:scriptImplementation="Adobe"

     But at this point we are really off topic and probably better discusses
in the yahoo SVG group.

> ----- Original Message -----
> From: "Denis Bohm" <de...@fireflydesign.com>
> To: "Batik Users" <ba...@xml.apache.org>
> Sent: Wednesday, August 27, 2003 12:19 AM
> Subject: Re: interperter exception
> 
> 
> 
>>If I change "text2.firstChild()" to "text2.firstChild" then it works.  I
>>assume the second form is the correct one?  And that Adobe is just more
>>forgiving...
>>
>>----- Original Message -----
>>From: "Denis Bohm" <de...@fireflydesign.com>
>>To: "Batik Users" <ba...@xml.apache.org>
>>Sent: Tuesday, August 26, 2003 4:06 PM
>>Subject: interperter exception
>>
>>
>>
>>>I'm trying to do some scripting within Batik and am getting an exception
>>>when trying to call a function on an element.  Anyone have any idea why?
>>>(The same SVG works in the Adobe plugin.)
>>>
>>><?xml version="1.0" encoding="utf-8"?>
>>><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
>>>"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
>>>]>
>>><svg width="600" height="400" onload="setText2('foo')">
>>>    <script type="text/ecmascript">
>>>function setText2(text) {
>>>    var text2 = document.getElementById("text2");
>>>    var oldNode = text2.firstChild();
>>>}
>>>    </script>
>>>    <text id="text2" x="60" y="40" text-anchor="end">???</text><text
>>
>>x="70"
>>
>>>y="40">b/sec</text>
>>></svg>
>>>
>>>
>>>TypeError: org.apache.batik.dom.GenericText@2da5a6 is not a function.
>>>(Inline <script>
>>>
> file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphys
> ics/ui/map/demo.svg:-1;
> 
>>>line 10)
>>>
>>> at
>>>
> 
> org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
> 
>>> at
>>>
> 
> org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557)
> 
>>> at
> 
> org.mozilla.javascript.NativeGlobal.typeError1(NativeGlobal.java:567)
> 
>>> at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1182)
>>>
>>> at org.mozilla.javascript.gen.c2.call(Inline <script>
>>>
> file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphys
> ics/ui/map/demo.svg:-1:10)
> 
>>> at
>>>
>>
> org.mozilla.javascript.optimizer.OptRuntime.callSimple(OptRuntime.java:275)
> 
>>> at org.mozilla.javascript.gen.c4.call(Event attribute
>>>
>>
> file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphys
> ics/ui/map/demo.svg:-1
> 
>>>onload:1)
>>>
>>> at org.mozilla.javascript.gen.c4.exec(Event attribute
>>>
>>
> file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphys
> ics/ui/map/demo.svg:-1
> 
>>>onload)
>>>
>>> at org.mozilla.javascript.Context.evaluateReader(Context.java:820)
>>>
>>> at
>>>
>>
> org.apache.batik.script.rhino.RhinoInterpreter.evaluate(RhinoInterpreter.jav
> 
>>>a:257)
>>>
>>> at
>>>
>>
> org.apache.batik.bridge.BaseScriptingEnvironment$1.handleEvent(BaseScripting
> 
>>>Environment.java:552)
>>>
>>> at
>>>
>>
> org.apache.batik.dom.events.EventSupport.fireEventListeners(EventSupport.jav
> 
>>>a:268)
>>>
>>> at
>>>
>>
> org.apache.batik.dom.events.EventSupport.dispatchEvent(EventSupport.java:231
> 
>>>)
>>>
>>> at
> 
> org.apache.batik.dom.AbstractNode.dispatchEvent(AbstractNode.java:455)
> 
>>> at
>>>
>>
> org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoad(BaseScripti
> 
>>>ngEnvironment.java:560)
>>>
>>> at
>>>
>>
> org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoadEvent(BaseSc
> 
>>>riptingEnvironment.java:492)
>>>
>>> at
>>>
>>
> org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(UpdateManager.jav
> 
>>>a:185)
>>>
>>> at
>>>
>>
> org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(SVGLoadEventDispatcher
> 
>>>.java:140)
>>>
>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>>>For additional commands, e-mail: batik-users-help@xml.apache.org
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>>For additional commands, e-mail: batik-users-help@xml.apache.org
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 




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


Re: interperter exception

Posted by Jamie <ja...@exponent.co.uk>.
AFAIO the correct syntax is: text2.getFirstChild(). This is the function you
should use in Adobe; from their CurrentSupport.pdf:

"The script engine interface technology available on Netscape for the
Macintosh does not support writable attributes on interfaces. To work around
this limitation, Adobe SVG Viewer supports additional "get/set" methods for
each DOM interface attribute. For cross-browser script compatibility you
should always use these methods instead of the writable attributes listed
below. For example, to read from and write to the attribute nodeValue on the
Node interface, use the methods getNodeValue and setNodeValue, instead."

Does this same syntax work in Batik?


----- Original Message -----
From: "Denis Bohm" <de...@fireflydesign.com>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Wednesday, August 27, 2003 12:19 AM
Subject: Re: interperter exception


> If I change "text2.firstChild()" to "text2.firstChild" then it works.  I
> assume the second form is the correct one?  And that Adobe is just more
> forgiving...
>
> ----- Original Message -----
> From: "Denis Bohm" <de...@fireflydesign.com>
> To: "Batik Users" <ba...@xml.apache.org>
> Sent: Tuesday, August 26, 2003 4:06 PM
> Subject: interperter exception
>
>
> > I'm trying to do some scripting within Batik and am getting an exception
> > when trying to call a function on an element.  Anyone have any idea why?
> > (The same SVG works in the Adobe plugin.)
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
> > "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
> > ]>
> > <svg width="600" height="400" onload="setText2('foo')">
> >     <script type="text/ecmascript">
> > function setText2(text) {
> >     var text2 = document.getElementById("text2");
> >     var oldNode = text2.firstChild();
> > }
> >     </script>
> >     <text id="text2" x="60" y="40" text-anchor="end">???</text><text
> x="70"
> > y="40">b/sec</text>
> > </svg>
> >
> >
> > TypeError: org.apache.batik.dom.GenericText@2da5a6 is not a function.
> > (Inline <script>
> >
>
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphys
ics/ui/map/demo.svg:-1;
> > line 10)
> >
> >  at
> >
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
> >
> >  at
> >
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557)
> >
> >  at
org.mozilla.javascript.NativeGlobal.typeError1(NativeGlobal.java:567)
> >
> >  at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1182)
> >
> >  at org.mozilla.javascript.gen.c2.call(Inline <script>
> >
>
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphys
ics/ui/map/demo.svg:-1:10)
> >
> >  at
> >
>
org.mozilla.javascript.optimizer.OptRuntime.callSimple(OptRuntime.java:275)
> >
> >  at org.mozilla.javascript.gen.c4.call(Event attribute
> >
>
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphys
ics/ui/map/demo.svg:-1
> > onload:1)
> >
> >  at org.mozilla.javascript.gen.c4.exec(Event attribute
> >
>
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphys
ics/ui/map/demo.svg:-1
> > onload)
> >
> >  at org.mozilla.javascript.Context.evaluateReader(Context.java:820)
> >
> >  at
> >
>
org.apache.batik.script.rhino.RhinoInterpreter.evaluate(RhinoInterpreter.jav
> > a:257)
> >
> >  at
> >
>
org.apache.batik.bridge.BaseScriptingEnvironment$1.handleEvent(BaseScripting
> > Environment.java:552)
> >
> >  at
> >
>
org.apache.batik.dom.events.EventSupport.fireEventListeners(EventSupport.jav
> > a:268)
> >
> >  at
> >
>
org.apache.batik.dom.events.EventSupport.dispatchEvent(EventSupport.java:231
> > )
> >
> >  at
org.apache.batik.dom.AbstractNode.dispatchEvent(AbstractNode.java:455)
> >
> >  at
> >
>
org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoad(BaseScripti
> > ngEnvironment.java:560)
> >
> >  at
> >
>
org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoadEvent(BaseSc
> > riptingEnvironment.java:492)
> >
> >  at
> >
>
org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(UpdateManager.jav
> > a:185)
> >
> >  at
> >
>
org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(SVGLoadEventDispatcher
> > .java:140)
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: batik-users-help@xml.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>


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


Re: interperter exception

Posted by Denis Bohm <de...@fireflydesign.com>.
If I change "text2.firstChild()" to "text2.firstChild" then it works.  I
assume the second form is the correct one?  And that Adobe is just more
forgiving...

----- Original Message ----- 
From: "Denis Bohm" <de...@fireflydesign.com>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Tuesday, August 26, 2003 4:06 PM
Subject: interperter exception


> I'm trying to do some scripting within Batik and am getting an exception
> when trying to call a function on an element.  Anyone have any idea why?
> (The same SVG works in the Adobe plugin.)
>
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
> "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
> ]>
> <svg width="600" height="400" onload="setText2('foo')">
>     <script type="text/ecmascript">
> function setText2(text) {
>     var text2 = document.getElementById("text2");
>     var oldNode = text2.firstChild();
> }
>     </script>
>     <text id="text2" x="60" y="40" text-anchor="end">???</text><text
x="70"
> y="40">b/sec</text>
> </svg>
>
>
> TypeError: org.apache.batik.dom.GenericText@2da5a6 is not a function.
> (Inline <script>
>
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphysics/ui/map/demo.svg:-1;
> line 10)
>
>  at
> org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
>
>  at
> org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557)
>
>  at org.mozilla.javascript.NativeGlobal.typeError1(NativeGlobal.java:567)
>
>  at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1182)
>
>  at org.mozilla.javascript.gen.c2.call(Inline <script>
>
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphysics/ui/map/demo.svg:-1:10)
>
>  at
>
org.mozilla.javascript.optimizer.OptRuntime.callSimple(OptRuntime.java:275)
>
>  at org.mozilla.javascript.gen.c4.call(Event attribute
>
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphysics/ui/map/demo.svg:-1
> onload:1)
>
>  at org.mozilla.javascript.gen.c4.exec(Event attribute
>
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphysics/ui/map/demo.svg:-1
> onload)
>
>  at org.mozilla.javascript.Context.evaluateReader(Context.java:820)
>
>  at
>
org.apache.batik.script.rhino.RhinoInterpreter.evaluate(RhinoInterpreter.jav
> a:257)
>
>  at
>
org.apache.batik.bridge.BaseScriptingEnvironment$1.handleEvent(BaseScripting
> Environment.java:552)
>
>  at
>
org.apache.batik.dom.events.EventSupport.fireEventListeners(EventSupport.jav
> a:268)
>
>  at
>
org.apache.batik.dom.events.EventSupport.dispatchEvent(EventSupport.java:231
> )
>
>  at org.apache.batik.dom.AbstractNode.dispatchEvent(AbstractNode.java:455)
>
>  at
>
org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoad(BaseScripti
> ngEnvironment.java:560)
>
>  at
>
org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoadEvent(BaseSc
> riptingEnvironment.java:492)
>
>  at
>
org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(UpdateManager.jav
> a:185)
>
>  at
>
org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(SVGLoadEventDispatcher
> .java:140)
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>


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


interperter exception

Posted by Denis Bohm <de...@fireflydesign.com>.
I'm trying to do some scripting within Batik and am getting an exception
when trying to call a function on an element.  Anyone have any idea why?
(The same SVG works in the Adobe plugin.)

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
]>
<svg width="600" height="400" onload="setText2('foo')">
    <script type="text/ecmascript">
function setText2(text) {
    var text2 = document.getElementById("text2");
    var oldNode = text2.firstChild();
}
    </script>
    <text id="text2" x="60" y="40" text-anchor="end">???</text><text x="70"
y="40">b/sec</text>
</svg>


TypeError: org.apache.batik.dom.GenericText@2da5a6 is not a function.
(Inline <script>
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphysics/ui/map/demo.svg:-1;
line 10)

 at
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)

 at
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557)

 at org.mozilla.javascript.NativeGlobal.typeError1(NativeGlobal.java:567)

 at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1182)

 at org.mozilla.javascript.gen.c2.call(Inline <script>
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphysics/ui/map/demo.svg:-1:10)

 at
org.mozilla.javascript.optimizer.OptRuntime.callSimple(OptRuntime.java:275)

 at org.mozilla.javascript.gen.c4.call(Event attribute
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphysics/ui/map/demo.svg:-1
onload:1)

 at org.mozilla.javascript.gen.c4.exec(Event attribute
file:/C:/home/denis/sandbox/networkphysics/prototype/sources/com/networkphysics/ui/map/demo.svg:-1
onload)

 at org.mozilla.javascript.Context.evaluateReader(Context.java:820)

 at
org.apache.batik.script.rhino.RhinoInterpreter.evaluate(RhinoInterpreter.jav
a:257)

 at
org.apache.batik.bridge.BaseScriptingEnvironment$1.handleEvent(BaseScripting
Environment.java:552)

 at
org.apache.batik.dom.events.EventSupport.fireEventListeners(EventSupport.jav
a:268)

 at
org.apache.batik.dom.events.EventSupport.dispatchEvent(EventSupport.java:231
)

 at org.apache.batik.dom.AbstractNode.dispatchEvent(AbstractNode.java:455)

 at
org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoad(BaseScripti
ngEnvironment.java:560)

 at
org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoadEvent(BaseSc
riptingEnvironment.java:492)

 at
org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(UpdateManager.jav
a:185)

 at
org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(SVGLoadEventDispatcher
.java:140)





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


Re: inconsistent display of stroke-dasharray

Posted by Thomas DeWeese <Th...@Kodak.com>.
>>David Eppstein wrote:
>>
>>>If you go to http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22485
>>>(a report of a seemingly unrelated and more serious bug with svg->pdf 
>>>conversion in batik) the attached svg and png files display the problem.
>>
>>     This renders fine for me on Windows.  I looks like this is a bug in the
>>Mac OS X JVM.  You might check if you have the most recent version (Apple
>>has a habit of doing 'stealth releases' of the Mac JVM)

David Eppstein wrote:

> I seem to be running the latest Java 1.4.1 release -- at least that's 
> what "java -version" tells me.  And I think Java is included in the 
> stuff OS X automatically checks for upgrades of (and automatically asks 
> the user to upgrade if one is found).

   Well, I would check the Apple Developers Connection.  When I was first
getting Batik to run on Mac OS X they had Java releases that were in
much better shape than the at the time current 'official' release.  I don't
know if this is still the case, but ADC doesn't cost anything so it is
probably worth your while checking it out (also if you decide to file a
bug report you probably need to do it there).

> So if it's a Mac bug, fixing it is not as simple as finding an update.
> Sigh...





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


Re: inconsistent display of stroke-dasharray

Posted by David Eppstein <ep...@ics.uci.edu>.
In article <3F...@Kodak.com>,
 Thomas DeWeese <Th...@Kodak.com> wrote:

> >>>Specifically, lines with different slopes within the same <g> group are 
> >>>shown with very different visual appearances, some looking like what I 
> >>>want, some as if I had done other dasharrays ranging in appearance from 
> >>>"2,1" to "4,2".  I.e., I get dashes that are too tightly spaced, dashes 
> >>>that are too long, etc.
> 
> > In article <3F...@Kodak.com>,
> >  Thomas DeWeese <Th...@Kodak.com> wrote:
> >
> >>   Well the Java rendering engine in Mac OS is pretty divergent from the
> >>rendering engine on Windows and other UNIX systems, so this may be a Mac
> >>specific problem.  Can you provide sample content that shows the problem?
> 
> David Eppstein wrote:
> > If you go to http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22485
> > (a report of a seemingly unrelated and more serious bug with svg->pdf 
> > conversion in batik) the attached svg and png files display the problem.
> 
>      This renders fine for me on Windows.  I looks like this is a bug in the
> Mac OS X JVM.  You might check if you have the most recent version (Apple
> has a habit of doing 'stealth releases' of the Mac JVM)

I seem to be running the latest Java 1.4.1 release -- at least that's 
what "java -version" tells me.  And I think Java is included in the 
stuff OS X automatically checks for upgrades of (and automatically asks 
the user to upgrade if one is found).

So if it's a Mac bug, fixing it is not as simple as finding an update.
Sigh...

-- 
David Eppstein                      http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science


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


Re: inconsistent display of stroke-dasharray

Posted by Thomas DeWeese <Th...@Kodak.com>.
>>David Eppstein wrote:
>>
>>>Specifically, lines with different slopes within the same <g> group are 
>>>shown with very different visual appearances, some looking like what I 
>>>want, some as if I had done other dasharrays ranging in appearance from 
>>>"2,1" to "4,2".  I.e., I get dashes that are too tightly spaced, dashes 
>>>that are too long, etc.

> In article <3F...@Kodak.com>,
>  Thomas DeWeese <Th...@Kodak.com> wrote:
>
>>   Well the Java rendering engine in Mac OS is pretty divergent from the
>>rendering engine on Windows and other UNIX systems, so this may be a Mac
>>specific problem.  Can you provide sample content that shows the problem?

David Eppstein wrote:
> If you go to http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22485
> (a report of a seemingly unrelated and more serious bug with svg->pdf 
> conversion in batik) the attached svg and png files display the problem.

     This renders fine for me on Windows.  I looks like this is a bug in the
Mac OS X JVM.  You might check if you have the most recent version (Apple
has a habit of doing 'stealth releases' of the Mac JVM)

     BTW you can 'work around' this problem by adjusting the viewBox attribute.
It appears that the PDF transcoder miscomputes the viewbox transform.  I'll
try and take a look at it (but this code actually comes from FOP so I don't
have any direct control over it).



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


Re: inconsistent display of stroke-dasharray

Posted by David Eppstein <ep...@ics.uci.edu>.
In article <3F...@Kodak.com>,
 Thomas DeWeese <Th...@Kodak.com> wrote:

> David Eppstein wrote:
> > With Batik 1.5 (both squiggle and rasterizer, binary download, under OS 
> > X 10.2.6), I am getting inconsistent results when I use SVG code like 
> > the following:
> >   <g ... stroke-dasharray="2,4">
> >       <line ... />
> >   </g>
> > 
> > Specifically, lines with different slopes within the same <g> group are 
> > shown with very different visual appearances, some looking like what I 
> > want, some as if I had done other dasharrays ranging in appearance from 
> > "2,1" to "4,2".  I.e., I get dashes that are too tightly spaced, dashes 
> > that are too long, etc.
> 
>    Well the Java rendering engine in Mac OS is pretty divergent from the
> rendering engine on Windows and other UNIX systems, so this may be a Mac
> specific problem.  Can you provide sample content that shows the problem?

If you go to http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22485
(a report of a seemingly unrelated and more serious bug with svg->pdf 
conversion in batik) the attached svg and png files display the problem.

-- 
David Eppstein                      http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science


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


Re: inconsistent display of stroke-dasharray

Posted by Thomas DeWeese <Th...@Kodak.com>.
David Eppstein wrote:
> With Batik 1.5 (both squiggle and rasterizer, binary download, under OS 
> X 10.2.6), I am getting inconsistent results when I use SVG code like 
> the following:
>   <g ... stroke-dasharray="2,4">
>       <line ... />
>   </g>
> 
> Specifically, lines with different slopes within the same <g> group are 
> shown with very different visual appearances, some looking like what I 
> want, some as if I had done other dasharrays ranging in appearance from 
> "2,1" to "4,2".  I.e., I get dashes that are too tightly spaced, dashes 
> that are too long, etc.

   Well the Java rendering engine in Mac OS is pretty divergent from the
rendering engine on Windows and other UNIX systems, so this may be a Mac
specific problem.  Can you provide sample content that shows the problem?

> Is this a known bug?
> Is there any workaround?

     Probably not, Stroking/Dashing is all handled by native Java classes.
We just provide the SVG stroke information to them.



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


How to keep trace of changes in SVG files?

Posted by maria teresa <ma...@isti.cnr.it>.
Hello everybody,
I am new to Batik, so maybe I am asking something stupid, anyway I would 
appreciate if somebody could help me on this issue.
I have an svg image onto which many different users should be able to add 
their comments in the position they prefer by means of an icon that acts as 
a link to the comment. Each comment should be saved together with its 
writer's ID on a database, in order to be retrieved later by anyone among 
the users (any user should be able to read the comment that another user 
has written by clicking on his comment-icon link positioned somewhere).
At the moment, I am using JavaScript to let the users add their comments on 
the svg image, but I have no idea about how to preserve trace of the 
comments (when the document is reloaded all the links added are lost).

Any suggestions?
Thank you,
maria teresa


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