0

我为windows开发了一个应用程序(它使用坐标系,Y从下到上增加),而android坐标是翻转的(Y从上到下增加)。如何转换矩阵 ( scale, translation, rotation) 以说明这种差异?

4

2 回答 2

0

获取高度 android 屏幕(或查看您将绘制图形)并从 Windows 中减去 Y 坐标

Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int androidHeight = size.y;  //f.e. 720px 

newYValue = androidHeight - windowsYPosition    //f.e. 620px = 720px - 100px
于 2013-10-18T00:49:55.200 回答
-1

将矩阵缩放:1,-1,您可能应该使用 Matrix.preScale

于 2013-10-17T19:53:45.820 回答