[Gambas-user] question about SVG
Rob Kudla
sourceforge-raindog2 at ...94...
Sat Jan 7 20:47:06 CET 2006
On Sat January 7 2006 05:03, tetsuo wrote:
> Could i load and manage SVG files with gambas?
Well, you can definitely load them, but it depends on what you
mean by "manage". If you want to deal with them from a data
perspective, you can load them using gb.xml's XmlReader class.
If you want to just use them as a graphic, gb.qt's Drawing class
is supposed to let you load, draw to, and save them, but I
wouldn't call it complete support yet.
> If the answer is yes.. how?
The following code (in a project with gb.xml selected) will
iterate through a SVG (or any other XML) file, listing its top
level elements:
DIM x AS NEW XmlReader
x.Open("/usr/share/xine/skins/Bambino-Purple/helpyourself.svg")
DO WHILE NOT x.Eof
x.Read
IF NOT x.eof THEN
PRINT "Found node " & x.Node.Name
ENDIF
LOOP
More information about the User
mailing list