Hi,all
I have a problem and I hope someone could help me.
I have displayed a map on WTK, and then I want to display a svg animation on the map.But there is error:
Using Pisces Renderer (native version)
java.lang.ClassCastException
and the code is :
private void drawSVG(){
Canvas svgCanvas;
SVGImage svgIamge = null;
//load a test svg
try {
InputStream svgStream = getClass().getResourceAsStream("thumbsUp.svg");
svgIamge = (SVGImage) (SVGImage.createImage(svgStream, null));
} catch (IOException ex) {
ex.printStackTrace();
}
//setup the svgAnaimation
SVGAnimator svgAnimator = SVGAnimator.createAnimator(svgIamge);
svgCanvas =(MapViewUI) svgAnimator.getTargetComponent();
svgAnimator.play();
}
the MapViewUI class is the GameCanvas to display the map.
I hope someone can help me.
Thanks in advance.
good regards.
zhaling

Reply With Quote

