[sonar] fix sonar plm

This commit is contained in:
zhongchao
2023-10-23 17:01:37 +08:00
parent 0672cbb39c
commit 5b910c2082
41 changed files with 1117 additions and 1279 deletions

View File

@@ -81,14 +81,14 @@ public class DirectionLayer extends ImageView implements MapStatusListener {
return;
}
canvas.save();
canvas.translate(getWidth() / 2, getHeight() / 2);
canvas.translate(getWidth() / 2.0f, getHeight() / 2.0f);
// mCamera.save();
// mCamera.rotateX(90 - mapController.getDAngle());
// mCamera.getMatrix(matrix);
// mCamera.restore();
canvas.concat(matrix);
canvas.rotate(mMapController.getMapViewRotation());
canvas.translate(-getWidth() / 2, -getHeight() / 2);
canvas.translate(-getWidth() / 2.0f, -getHeight() / 2.0f);
super.onDraw(canvas);
canvas.restore();
postInvalidate();

View File

@@ -65,7 +65,7 @@ public class PubFunction
*/
public static double GetLineAngle(int nX1, int nY1, int nX2, int nY2)
{
return getAngleToNorth((nX2 - nX1)/5, (nY2 - nY1)/4);
return getAngleToNorth((nX2 - nX1)/5.0f, (nY2 - nY1)/4.0f);
}
}