Xojo Conferences

« Addressbook classes u… | Home | MBS Filemaker Plugin,… »

Tip of the day: Render SVG with GraphicsMagick Plugin

You can render SVG files like this using our GraphicsMagick plugin:
  Sub RenderSimple()
dim file as FolderItem = SpecialFolder.Desktop.Child("EUworld.svg")

dim g as new GMImageMBS(file)

Backdrop = g.CopyPicture
End Sub
And if you need to scale, you can use a GMGeometryMBS object with a scaling factor:
  Sub RenderScaled()
// render with 200%

// first open file and read data in blob
dim file as FolderItem = SpecialFolder.Desktop.Child("EUworld.svg")
dim stream as BinaryStream = BinaryStream.Open(file)
dim data as string = stream.Read(stream.Length)
dim blob as new GMBlobMBS(data)

// 200% in width and height
dim geo as new GMGeometryMBS("200%x200%")

// open image
dim g as new GMImageMBS(blob, geo)

// get Real Studio picture
Backdrop = g.CopyPicture
End Sub
30 06 11 - 10:44
No comments

Remember personal info?

Emoticons / Textile

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.