WebGraphics.DrawPicture

From Xojo Documentation

Method

WebGraphics.DrawPicture(p As Picture, x As Integer, y As Integer [,width As Integer ] [, height as Integer ])

Supported for all project types and targets.

Draws the picture at the specified location. The picture can be shown at full size or cropped. All units are pixels.


Method

WebGraphics.DrawPicture(pic As WebImageView, x As Integer, y As Integer [,width As Integer ] [, height as Integer ])

Supported for all project types and targets.

Draws the picture from a WebImageView at the specified location. The picture can be shown at full size or cropped. All units are pixels.

Notes

x and y are the distances from the top-left corner of the control or window from which the 0,0 point of the image will be drawn. The optional parameters are used to copy a portion of the picture for cropping.

If you are cropping, then width and height are required.

Examples

The following code crops the image. It copies only the top 150 pixels of the original image at full size:

g.DrawPicture(myImage, 0, 0, 600, 150)

This draws the full image:

g.DrawPicture(myImage, 0, 0)