B4A Library [Lib] Accelerated surface

Informatix

Expert
Licensed User
Longtime User
I don't see a way in the library to draw a bitmap rotated(or with matrix) with a srcRect, to choose which tile from a sprite sheet to draw. Is there a way to do this with this library?
A documentation is provided. Please read it.

  • DrawBitmap (Bmp As Bitmap, SrcRect As Rect, DestRect As Rect)
    Draws the given bitmap.
    SrcRect: The subset of the bitmap that will be drawn. If Null then the complete bitmap will be drawn.
    DestRect: The rectangle that the bitmap will be drawn into.

    AC.SaveState
    AC.RotateCanvasAround(45, PivotX, PivotY)
    AC.DrawBitmap(bmpSmiley, SrcSmiley, DestSmiley)
    AC.RestoreState

 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…