Drawing mirrored bitmaps in android

前端 未结 3 1116
一个人的身影
一个人的身影 2020-12-03 03:12

I\'m trying to learn how to make an animated sprite in android and couldn\'t figure out how to go about organising my bitmaps. I have a sprite sheet of my character walking

3条回答
  •  独厮守ぢ
    2020-12-03 03:44

    To mirror your sprite simply apply the following transform on the Canvas: scale(-1, 1). You will have to offset the sprite by its width too.

提交回复
热议问题