Hi batik-users,
I still want to draw an svg to my graphics context. I tried the following
little java programm without success. I would have expected that the svg
woulb be drawn to my frame. (At least after waiting some time to give the
app the chance to load the svg file and then forcing the frame to be redrawn
...)
What am I missing here?
Thanks
Charly
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Color;
import java.awt.geom.AffineTransform;
import javax.swing.JFrame;
import javax.swing.JPanel;
import org.apache.batik.swing.JSVGCanvas;
public class xmt extends JFrame
{
public static void main(String[] args) {
xmt myFrame = new xmt();
myFrame.setSize(400,400);
myFrame.setVisible(true);
}
private JSVGCanvas svg;
xmt() {
svg = new JSVGCanvas();
svg.setURI("file:../fc02.svg");
}
public void paint(Graphics g) {
System.out.println("paint");
super.paint(g);
// svg.setPaintingTransform(new AffineTransform(0.5, 0.0, 0.0, 0.5,
100.0, 100.0));
svg.paintComponent(g);
}
}
--
"Feel free" mit GMX FreeMail!
Monat für Monat 10 FreeSMS inklusive! http://www.gmx.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]