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 rms816 <rm...@gmail.com> on 2010/07/07 06:58:24 UTC
SVG Marker issue with batik.
When I am trying to render the markers on JSVGCanvas,it is coming properly,
but on mousemove, it is showing NullpointerException at the below line.
After debugging, I came to know that this is because of the Markers.When I
remove the Markers from the same file and parse with batik it is working as
expected.
java.lang.NullPointerException
at java.awt.geom.Rectangle2D.add(Unknown Source)
at org.apache.batik.gvt.CompositeShapePainter.getSensitiveBounds2D(Unknown
Source)
at org.apache.batik.gvt.ShapeNode.getSensitiveBounds(Unknown Source)
at
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedSensitiveBounds(Unknown
Source)
at
org.apache.batik.gvt.CompositeGraphicsNode.getTransformedSensitiveBounds(Unknown
Source)
at
org.apache.batik.gvt.CompositeGraphicsNode.getTransformedSensitiveBounds(Unknown
Source)
at
org.apache.batik.gvt.CompositeGraphicsNode.getTransformedSensitiveBounds(Unknown
Source)
at
org.apache.batik.gvt.CompositeGraphicsNode.getTransformedSensitiveBounds(Unknown
Source)
at org.apache.batik.gvt.CompositeGraphicsNode.getSensitiveBounds(Unknown
Source)
at org.apache.batik.gvt.CompositeGraphicsNode.nodeHitAt(Unknown Source)
at org.apache.batik.gvt.event.AWTEventDispatcher.dispatchMouseEvent(Unknown
Source)
at org.apache.batik.gvt.event.AWTEventDispatcher.dispatchEvent(Unknown
Source)
at org.apache.batik.gvt.event.AWTEventDispatcher.mouseExited(Unknown
Source)
at org.apache.batik.swing.svg.JSVGComponent$21.run(Unknown Source)
at org.apache.batik.util.RunnableQueue.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Is it a problem of my code?
Any help would be very welcome.
Thanks in advance
Rms
--
View this message in context: http://old.nabble.com/SVG-Marker-issue-with-batik.-tp29092689p29092689.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: SVG Marker issue with batik.
Posted by th...@kodak.com.
Hi rms816,
rms816 <rm...@gmail.com> wrote on 07/21/2010 03:00:52 AM:
> It is working, but I am facing some problem when svg has the markers
with
> rotation.
> When I move or drag the element which has the roation attribute, it is
> disappearing on the canvas.
> I guess it is because of the x and y coordinates .
Sounds like you need to go the Affine Transform school.
Dragging elements with scale/rotation is tricky unless you
have studied your Affine Transforms.
> thomas.deweese wrote:
> >
> > Hi RMS,
> >
> > rms816 <rm...@gmail.com> wrote on 07/07/2010 12:58:24 AM:
> >
> >> When I am trying to render the markers on JSVGCanvas,it is coming
> > properly,
> >> but on mousemove, it is showing NullpointerException at the below
line.
> >
> > I fixed something that may resolve this issue (SVN Rev 961320).
> > In the future please provide a stand-alone test case if at all
possible
> > as it provides a way to check if the problem is really fixed.
> >
> >
> >
>
> --
> View this message in context: http://old.nabble.com/SVG-Marker-
> issue-with-batik.-tp29092689p29222499.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
Re: SVG Marker issue with batik.
Posted by rms816 <rm...@gmail.com>.
Hi Thomas,
It is working, but I am facing some problem when svg has the markers with
rotation.
When I move or drag the element which has the roation attribute, it is
disappearing on the canvas.
I guess it is because of the x and y coordinates .
Thanks
RMS
thomas.deweese wrote:
>
> Hi RMS,
>
> rms816 <rm...@gmail.com> wrote on 07/07/2010 12:58:24 AM:
>
>> When I am trying to render the markers on JSVGCanvas,it is coming
> properly,
>> but on mousemove, it is showing NullpointerException at the below line.
>
> I fixed something that may resolve this issue (SVN Rev 961320).
> In the future please provide a stand-alone test case if at all possible
> as it provides a way to check if the problem is really fixed.
>
>
>
--
View this message in context: http://old.nabble.com/SVG-Marker-issue-with-batik.-tp29092689p29222499.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: SVG Marker issue with batik.
Posted by fireball <sa...@hotmail.com>.
Not sure if I want to move to 1.8 now... might be risky.
I noticed that the binary distribution has AWTEventDispatcher class but the
source code does not.
I opened the project in eclipse and that's what it is complaining about as
well as other classes such as JSVGCanvas.
This is weird.... it should have failed on your side too since we both are
using the same source code.
Maybe I have a configuration issue or something?
--
View this message in context: http://batik.2283329.n4.nabble.com/SVG-Marker-issue-with-batik-tp2979528p4655263.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: SVG Marker issue with batik.
Posted by jonathan wood <jo...@gmail.com>.
Interesting. For the record, my output after a fresh checkout is below.
Although not a normal thing, I can help you get the 1.8pre distro to help
continue your development. Let's not drop this topic though as any build
issues should be resolved or result in a defect report. Contact me
directly via email if you want to arrange dropbox or otherwise.
As advertised, my output:
U batik
Checked out revision 1388115.
[jwood@localhost scratch]$ cd batik/
[jwood@localhost batik]$ sh build.sh jars
Buildfile: build.xml
init:
== Apache Batik 1.8pre build file ================================
JAVA_HOME: /usr/lib/jvm/java/
VM: 23.2-b09, Oracle Corporation
compile-prepare:
Created dir: /home/jwood/scratch/batik/classes
debug off, optimize on, deprecation on
compile:
Compiling 1444 source files to /home/jwood/scratch/batik/classes
/home/jwood/scratch/batik/sources/org/apache/batik/apps/rasterizer/SVGConverter.java:884:
warning: [deprecation] toURL() in File has been deprecated
URL userDir = new
File(System.getProperty("user.dir")).toURL();
^
/home/jwood/scratch/batik/sources/org/apache/batik/apps/rasterizer/SVGConverterFileSource.java:64:
warning: [deprecation] toURL() in File has been deprecated
String uri = file.toURL().toString();
^
/home/jwood/scratch/batik/sources/org/apache/batik/apps/slideshow/Main.java:132:
warning: [deprecation] toURL() in File has been deprecated
String fileName = files[ i ].toURL().toString();
^
/home/jwood/scratch/batik/sources/org/apache/batik/apps/slideshow/Main.java:310:
warning: [deprecation] toURL() in File has been deprecated
URL flURL = new File(file).toURL();
^
/home/jwood/scratch/batik/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java:1258:
warning: [deprecation] toURL() in File has been deprecated
String furl = f.toURL().toString();
^
/home/jwood/scratch/batik/sources/org/apache/batik/apps/svgbrowser/Main.java:518:
warning: [deprecation] toURL() in File has been deprecated
policyFile.toURL().toString());
^
/home/jwood/scratch/batik/sources/org/apache/batik/apps/svgbrowser/Main.java:550:
warning: [deprecation] toURL() in File has been deprecated
uri = file.toURL().toString();
^
/home/jwood/scratch/batik/sources/org/apache/batik/apps/svgbrowser/Main.java:849:
warning: [deprecation] toURL() in File has been deprecated
return f.toURL().toString();
^
/home/jwood/scratch/batik/sources/org/apache/batik/apps/svgbrowser/Main.java:963:
warning: [deprecation] encode(String) in URLEncoder has been deprecated
(URLEncoder.encode(lastVisited.get(i).toString()));
^
/home/jwood/scratch/batik/sources/org/apache/batik/apps/svgbrowser/Main.java:1016:
warning: [deprecation] decode(String) in URLDecoder has been deprecated
lastVisited.addElement(URLDecoder.decode(st.nextToken()));
^
/home/jwood/scratch/batik/sources/org/apache/batik/svggen/AbstractImageHandlerEncoder.java:122:
warning: [deprecation] toURL() in File has been deprecated
this.urlRoot = imageDirFile.toURL().toString();
^
/home/jwood/scratch/batik/sources/org/apache/batik/transcoder/print/PrintTranscoder.java:785:
warning: [deprecation] toURL() in File has been deprecated
transcoder.transcode(new TranscoderInput(new
File(args[i]).toURL().toString()),
^
/home/jwood/scratch/batik/sources/org/apache/batik/transcoder/wmf/tosvg/WMFTranscoder.java:262:
warning: [deprecation] toURL() in File has been deprecated
TranscoderInput input = new
TranscoderInput(inputFile.toURL().toString());
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
13 warnings
determine-svn-revision-svn-info:
determine-svn-revision-transform:
determine-svn-revision-from-file:
determine-svn-revision-set:
Deleting: /home/jwood/scratch/batik/svn-info.xml
determine-svn-revision:
prepare-build:
Created dir: /home/jwood/scratch/batik/batik-1.8pre
Created dir: /home/jwood/scratch/batik/batik-1.8pre/docs
Created dir: /home/jwood/scratch/batik/batik-1.8pre/lib
ext-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-ext.jar
util-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-util.jar
awt-util-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-awt-util.jar
gui-util-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-gui-util.jar
dom-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-dom.jar
css-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-css.jar
svg-dom-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-svg-dom.jar
gvt-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-gvt.jar
parser-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-parser.jar
script-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-script.jar
transcoder-jar:
Building jar:
/home/jwood/scratch/batik/batik-1.8pre/lib/batik-transcoder.jar
bridge-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-bridge.jar
swing-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-swing.jar
anim-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-anim.jar
codec-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-codec.jar
extension-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-extension.jar
xml-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-xml.jar
root-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/batik.jar
svg-pp-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/batik-svgpp.jar
svggen-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/lib/batik-svggen.jar
svg-slideshow-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/batik-slideshow.jar
squiggle-jar:
Moving 1 file to
/home/jwood/scratch/batik/resources/org/apache/batik/apps/svgbrowser/resources
Moving 1 file to
/home/jwood/scratch/batik/resources/org/apache/batik/apps/svgbrowser/resources
Building jar: /home/jwood/scratch/batik/batik-1.8pre/batik-squiggle.jar
Moving 1 file to
/home/jwood/scratch/batik/resources/org/apache/batik/apps/svgbrowser/resources
Moving 1 file to
/home/jwood/scratch/batik/resources/org/apache/batik/apps/svgbrowser/resources
squiggle-ext-jar:
Created dir: /home/jwood/scratch/batik/batik-1.8pre/extensions
Building jar:
/home/jwood/scratch/batik/batik-1.8pre/extensions/batik-squiggle-ext.jar
rasterizer-jar:
Moving 1 file to
/home/jwood/scratch/batik/resources/org/apache/batik/apps/rasterizer/resources
Moving 1 file to
/home/jwood/scratch/batik/resources/org/apache/batik/apps/rasterizer/resources
Building jar: /home/jwood/scratch/batik/batik-1.8pre/batik-rasterizer.jar
Moving 1 file to
/home/jwood/scratch/batik/resources/org/apache/batik/apps/rasterizer/resources
Moving 1 file to
/home/jwood/scratch/batik/resources/org/apache/batik/apps/rasterizer/resources
rasterizer-ext-jar:
Building jar:
/home/jwood/scratch/batik/batik-1.8pre/extensions/batik-rasterizer-ext.jar
ttf2svg-jar:
Building jar: /home/jwood/scratch/batik/batik-1.8pre/batik-ttf2svg.jar
jars:
Copying 6 files to /home/jwood/scratch/batik/batik-1.8pre/lib
BUILD SUCCESSFUL
Total time: 13 seconds
[jwood@localhost batik]$ java -version
java version "1.7.0_06-icedtea"
OpenJDK Runtime Environment (fedora-2.3.1.fc17.2-x86_64)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
On Thu, Sep 20, 2012 at 12:55 PM, fireball <sa...@hotmail.com> wrote:
> Both fail for me even after another clean copy.
>
> Could it be Java version?
>
> Mine is:
> C:\>java -version
> java version "1.7.0_07"
> Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
> Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
>
>
>
> --
> View this message in context:
> http://batik.2283329.n4.nabble.com/SVG-Marker-issue-with-batik-tp2979528p4655261.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>
Re: SVG Marker issue with batik.
Posted by fireball <sa...@hotmail.com>.
Both fail for me even after another clean copy.
Could it be Java version?
Mine is:
C:\>java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
--
View this message in context: http://batik.2283329.n4.nabble.com/SVG-Marker-issue-with-batik-tp2979528p4655261.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: SVG Marker issue with batik.
Posted by jonathan wood <jo...@gmail.com>.
Hi Fireball,
I believe you may be seeing an error on the javadoc build. On a fresh
checkout I see the problem there. A target of jars or all-jar works for me.
On Thu, Sep 20, 2012 at 10:47 AM, fireball <sa...@hotmail.com> wrote:
> Thanks Jonathan.
>
> I grabbed the source code from Batik's website. I ran 'build.bat compile'.
> I
> have compilation errors and warnings. I tried it with Xlint:unchecked and
> not much info.
>
> Most of errors are about missing packages such as
> 'com.sun.image.codec.jped'.
>
> Any ideas?
>
>
>
> --
> View this message in context:
> http://batik.2283329.n4.nabble.com/SVG-Marker-issue-with-batik-tp2979528p4655259.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>
Re: SVG Marker issue with batik.
Posted by fireball <sa...@hotmail.com>.
Thanks Jonathan.
I grabbed the source code from Batik's website. I ran 'build.bat compile'. I
have compilation errors and warnings. I tried it with Xlint:unchecked and
not much info.
Most of errors are about missing packages such as
'com.sun.image.codec.jped'.
Any ideas?
--
View this message in context: http://batik.2283329.n4.nabble.com/SVG-Marker-issue-with-batik-tp2979528p4655259.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: SVG Marker issue with batik.
Posted by jonathan wood <jo...@gmail.com>.
Hi Fireball,
You'll need to check out the source and build yourself. This should get
you started. Run the build script once you have pulled the code and it
will give you the available build targets.
http://xmlgraphics.apache.org/batik/download.cgi#Subversion+repository
On Wed, Sep 19, 2012 at 11:28 AM, fireball <sa...@hotmail.com> wrote:
> This fix seems to be old but I cannot find it in Batik 1.7. How do I get
> this
> fix?
>
> fireball.
>
>
>
> --
> View this message in context:
> http://batik.2283329.n4.nabble.com/SVG-Marker-issue-with-batik-tp2979528p4655255.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>
Re: SVG Marker issue with batik.
Posted by fireball <sa...@hotmail.com>.
This fix seems to be old but I cannot find it in Batik 1.7. How do I get this
fix?
fireball.
--
View this message in context: http://batik.2283329.n4.nabble.com/SVG-Marker-issue-with-batik-tp2979528p4655255.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: SVG Marker issue with batik.
Posted by th...@kodak.com.
Hi RMS,
rms816 <rm...@gmail.com> wrote on 07/07/2010 12:58:24 AM:
> When I am trying to render the markers on JSVGCanvas,it is coming
properly,
> but on mousemove, it is showing NullpointerException at the below line.
I fixed something that may resolve this issue (SVN Rev 961320).
In the future please provide a stand-alone test case if at all possible
as it provides a way to check if the problem is really fixed.