Dokumentaro de Gambaso
Compilation & Installation
Components
gb
gb.crypt
gb.qt4
Control
Key
Documents
Indekso de Lingvo
Language Overviews
LeguMin
Lexicon
Registro

SvgImage (gb.qt4)

This class represents a SVG file loaded from a file into memory.

This class is creatable.

Static methods
Load   Load a SVG document from the file Path, and return it as a new SvgImage.

Properties
H   A synonymous of the Height property.
Height   Return or set the height of the SVG document in points.
W   A synonymous of the Width property.
Width   Return or set the width of the SVG document in points.

Methods
Clear   Clear the SVG document.
Paint   Public Sub DrawingArea1_Draw()
Resize   Resize the SVG document.
Save   Save the SVG image to disk as a SVG file.

SvgImage objects can be painted with the Paint class, and saved back to the disk.

Example

' Load the gambas logo, add a nice red ball to it, and save it back to disk.

Dim hSvgImage As SvgImage

hSvgImage = SvgImage.Load("~/gambas.svg")

Paint.Begin(hSvgImage)
Paint.Brush = Paint.RadialGradient(200, 140, 40, 215, 115, [Color.RGB(255, 0, 0, 64), Color.White], [1.0, 0.1])
Paint.Arc(200, 140, 40)
Paint.Fill
Paint.End

hSvgImage.Save("~/gambas with red ball.svg")

The SVG support of Qt has many bugs for years. I don't know if it will be better with Qt5.