I’m using RotateFlip to flip sprites horizontally. It seems that RotateFlip is applied when Graphics is drawn not image.
The problem is that some sprites needs to be flipped and some not (depending on direction of sprite). I don’t want to clone image each time I’m drawing flipped sprite.
Consider using a transformation matrix on the
Graphicsobject instead of usingRotateFlipon the image. Flipping is equivalent to scaling the X or Y coordinates by -1. You can pre-compute a single flip matrix and use it whenever you want:Note however that you will have to pass in modified coordinates when drawing, for eg. using the above transform, you’ll have to pass in
ContainerWidth - Xinstead ofX.