Dela via


Canvas.Matrix Property

Definition

Caution

deprecated

Return a new matrix with a copy of the canvas' current transformation matrix. -or- Completely replace the current matrix with the specified matrix.

public Android.Graphics.Matrix Matrix { [Android.Runtime.Register("getMatrix", "()Landroid/graphics/Matrix;", "")] [System.Obsolete("deprecated")] get; [Android.Runtime.Register("setMatrix", "(Landroid/graphics/Matrix;)V", "GetSetMatrix_Landroid_graphics_Matrix_Handler")] set; }
[<get: Android.Runtime.Register("getMatrix", "()Landroid/graphics/Matrix;", "")>]
[<get: System.Obsolete("deprecated")>]
[<set: Android.Runtime.Register("setMatrix", "(Landroid/graphics/Matrix;)V", "GetSetMatrix_Landroid_graphics_Matrix_Handler")>]
member this.Matrix : Android.Graphics.Matrix with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Return a new matrix with a copy of the canvas' current transformation matrix.

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().

Property setter documentation:

Completely replace the current matrix with the specified matrix. If the matrix parameter is null, then the current matrix is reset to identity.

<strong>Note:</strong> it is recommended to use #concat(Matrix), #scale(float, float), #translate(float, float) and #rotate(float) instead of this method.

Java documentation for android.graphics.Canvas.setMatrix(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

See also