开发者

Rotating images wit odd pixel sides length

what is the best approach of solving this problem:

If you have an image whose sides are even for example 48 x 24 you may do this and you are just fine:

开发者_如何学编程
matrix.translate(-24, -12);
matrix.rotate(Math.PI);
matrix.translate(24, 12);

But if you have an image of size something like 49 x 25, then there is a problem with those odd pixels, how to compute when and where to add or remove those odd pixels so image gets allways perfectly rotated?

Thank you for any help!


Just translate by -24.5 and -12.5, etc, instead of -24 and -12.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜