PixmapShape.Constructor(image as Picture)

From Xojo Documentation

Revision as of 00:43, 25 July 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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:

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