SvgImage (gb.qt4)

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

Deze klasse is creƫerbaar.

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

Eigenschappen
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.

Methode
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.