Thanks to this post I’m learning about PixmapShape
The docs are not clear about PixmapShape.SourceTop (for me) and the example did not help.
[code]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.
Dim p As Picture
Dim px As PixmapShape
p = New Picture(558, 372)
px = New PixmapShape(p)
px.Image = CarImage
Label1.Text = Str(px.SourceLeft)
Label2.Text = Str(px.SourceTop)
Label3.Text = Str(px.SourceWidth)
Label4.Text = Str(px.SourceHeight)[/code]
Of course I don’t have CarImage so I used several images (different sizes). I always get 0, 0, 558, 372. If I change the values here:
p = New Picture(558, 372)
then the values change.
I know my English is not great, maybe that’s why it doesn’t make sense to me. I changed the example to:
[code]Dim px As PixmapShape
px = New PixmapShape(CarImage)
Label1.Text = Str(px.SourceLeft)
Label2.Text = Str(px.SourceTop)
Label3.Text = Str(px.SourceWidth)
Label4.Text = Str(px.SourceHeight)[/code]
I get the width and height of the image I put instead of ‘CarImage’.
But still I don’t understand how or when px.SourceTop <> 0. I also see that px.SourceWidth = px.Width, same with Height.
Can anyone point me to more information/examples?
Thanks.