PixmapShape.SourceWidth

From Xojo Documentation

Property (As Integer )
aPixmapShape.SourceWidth = newIntegerValue
or
IntegerValue = aPixmapShape.SourceWidth

Supported for all project types and targets.

The width (pixels) from SourceLeft of Image to draw. Used to define a subregion of Image to use.

Example

This example reports the left, top, width, and height of the image that was assigned to the PixmapShape. This image was added to the project and the coordinates are 0, 0, 558, 372.

Var p As Picture
Var px As PixmapShape
p = New Picture(558, 372)
px = New PixmapShape(p)
px.Image = CarImage

Label1.Value = px.SourceLeft.ToString
Label2.Value = px.SourceTop.ToString
Label3.Value = px.SourceWidth.ToString
Label4.Value = px.SourceHeight.ToString