PixmapShape.Constructor(image as Picture)

From Xojo Documentation

Constructor
PixmapShape.Constructor(image as Picture)

Creates a new PixMapShape that is initialized to the passed image.

Example

The following code in the Paint event of a Canvas draws a red oval using the Constructor to initialize the shape:

Dim p As Picture
p = New Picture(240, 200)
p.Graphics.ForeColor = &cFF0000
p.Graphics.FillOval(0, 0, 240, 200)
Dim px As New PixmapShape(p)
px.Rotation = 45 / 57.2958 // 45 Degrees in radians
g.DrawObject(px, 150, 150)