Partager via


Canvas.GetMatrix(Matrix) Method

Definition

Caution

deprecated

Return, in ctm, the current transformation matrix.

[Android.Runtime.Register("getMatrix", "(Landroid/graphics/Matrix;)V", "GetGetMatrix_Landroid_graphics_Matrix_Handler")]
[System.Obsolete("deprecated")]
public virtual void GetMatrix (Android.Graphics.Matrix ctm);
[<Android.Runtime.Register("getMatrix", "(Landroid/graphics/Matrix;)V", "GetGetMatrix_Landroid_graphics_Matrix_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member GetMatrix : Android.Graphics.Matrix -> unit
override this.GetMatrix : Android.Graphics.Matrix -> unit

Parameters

ctm
Matrix
Attributes

Remarks

Return, in ctm, the current transformation matrix. This does not alter the matrix in the canvas, but just returns a copy of it.

This member is deprecated. #isHardwareAccelerated() Hardware accelerated canvases may have any matrix when passed to a View or Drawable, as it is implementation defined where in the hierarchy such canvases are created. It is recommended in such cases to either draw contents irrespective of the current matrix, or to track relevant transform state outside of the canvas.

Java documentation for android.graphics.Canvas.getMatrix(android.graphics.Matrix).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to