/** * Preconcat the current matrix with the specified translation * * @param dx The distance to translate in X * @param dy The distance to translate in Y */ public void translate(float dx, float dy) { native_translate(mNativeCanvasWrapper, dx, dy); }
在X方向和Y方向移动的距离
如果原来的原点是(10,10),通过canvas.translate(10,10)移动的原点是(20,20),而不是移动到(10,10)