comp • gb.qt4 • svgimage

SvgImage (gb.qt4)

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

Esta clase es
Create a new void SvgImage.
instanciable
.

Métodos estáticos

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

Propiedades

Métodos
A synonymous of the Height property.
H  
Return or set the height of the SVG document in points.
Height  
A synonymous of the Width property.
W  
Return or set the width of the SVG document in points.
Width  
Clear the SVG document.
Clear  
Public Sub DrawingArea1_Draw()
Paint  
Resize the SVG document.
Resize  
Save the SVG image to disk as a SVG file.
Save  

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.