If I have a TreeViewer or Table,or I have some buttons,labels which contain different text,pic and so on. Now,I want to export these to a SVG pic.
Does anyone know about this?
Many Thanks!
If I have a TreeViewer or Table,or I have some buttons,labels which contain different text,pic and so on. Now,I want to export these to a SVG pic.
Does anyone know about this?
Many Thanks!
I don't know about SVG, but the
org.eclipse.swt.graphics.ImageLoader
can be used to save aorg.eclipse.swt.graphics.GC
in various formats like PNG, GIF, JPEG and BMP. You can convert the result to SVG if you'd like.You can find examples of how to save a GC to a file (like this one). You can also copy an existing GC using the
copyArea
method. Take a look at this source code. Look for the usage of gc.copyArea method and you'll find a example of how to take such a snapshot.