Skip to content

A module that extends the Xojo Graphics object with a DrawSVG method.

License

Notifications You must be signed in to change notification settings

Zoclee/xojo-drawsvg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Xojo DrawSVG Module

A module that extends the Graphics object with a DrawSVG method.

Installation

Simply copy the DrawSVG module from the project located in the source folder to your own project. For Windows projects you need to switch on the "Use GDI Plus" option.

Example Code

// Draw SVG stored as a string

Sub Paint(g As Graphics, areas() As REALbasic.Rect)
	g.DrawSVG "Some SVG XML", 100, 100
End Sub

// Draw SVG stored in an XMLDocument object

Sub Paint(g As Graphics, areas() As REALbasic.Rect)
	Dim myDoc As XmlDocument
	myDoc = new XmlDocument("Some SVG XML")
	g.DrawSVG myDoc, 100, 100
End Sub	

// Load SVG as Picture object

Sub Paint(g As Graphics, areas() As REALbasic.Rect)
	Dim myPic As Picture
	myPic = SomeFolderItem.OpenAsSVG()
	g.DrawPicture myPic, 100, 100
End Sub	

About

A module that extends the Xojo Graphics object with a DrawSVG method.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages