image strip position

tremara1

Active Member
Licensed User
Longtime User
Can someone point me to as to whether or not use can position an image in a view, what I am aiming for is using an image strip and moving it to display a certain section of the image(strip). I hope you can understand my request. I thought it might be gravity but that does not seem to have x and y position to set.
 

klaus

Expert
Licensed User
Longtime User
You need to use a Canvas object.
With
Canvas1.DrawBitmap(Bitmap1 As Bitmap, SrcRect As Rect, DestRect As Rect)
you can copy a part of the Bitmap1 bitmap (SrcRect) source rectangle to the Activity (DestRect) destination rectangle or an ImageView.
If the Widths and or Heights of both rectangles are different, the bitmap is rescaled according to the rectangles sides ratios.

Best regards.
 
Upvote 0
Top