Matrix Class

Definition

The Matrix class holds a 3x3 matrix for transforming coordinates.

[Android.Runtime.Register("android/graphics/Matrix", ApiSince=1, DoNotGenerateAcw=true)]
public class Matrix : Java.Lang.Object
type Matrix = class
    inherit Object
Inheritance
Matrix
Attributes

Remarks

Android platform documentation

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.

Constructors

Matrix()

Create an identity matrix

Matrix(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Matrix(Matrix)

Create a matrix that is a (deep) copy of src

Fields

Mpersp0
Mpersp1
Mpersp2
MscaleX
MscaleY
MskewX
MskewY
MtransX
MtransY

Properties

Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsAffine

Gets whether this matrix is affine.

IsIdentity

Returns true if the matrix is identity.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
GetValues(Single[])

Copy 9 values from the matrix into the array.

Invert(Matrix)

If this matrix can be inverted, return true and if inverse is not null, set inverse to be the inverse of this matrix.

JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
MapPoints(Single[])

Apply this matrix to the array of 2D points, and write the transformed points back into the array

MapPoints(Single[], Int32, Single[], Int32, Int32)

Apply this matrix to the array of 2D points specified by src, and write the transformed points into the array of points specified by dst.

MapPoints(Single[], Single[])

Apply this matrix to the array of 2D points specified by src, and write the transformed points into the array of points specified by dst.

MapRadius(Single)

Return the mean radius of a circle after it has been mapped by this matrix.

MapRect(RectF)

Apply this matrix to the rectangle, and write the transformed rectangle back into it.

MapRect(RectF, RectF)

Apply this matrix to the src rectangle, and write the transformed rectangle into dst.

MapVectors(Single[])

Apply this matrix to the array of 2D vectors, and write the transformed vectors back into the array.

MapVectors(Single[], Int32, Single[], Int32, Int32)

Apply this matrix to the array of 2D vectors specified by src, and write the transformed vectors into the array of vectors specified by dst.

MapVectors(Single[], Single[])

Apply this matrix to the array of 2D vectors specified by src, and write the transformed vectors into the array of vectors specified by dst.

Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
PostConcat(Matrix)

Postconcats the matrix with the specified matrix.

PostRotate(Single)

Postconcats the matrix with the specified rotation.

PostRotate(Single, Single, Single)

Postconcats the matrix with the specified rotation.

PostScale(Single, Single)

Postconcats the matrix with the specified scale.

PostScale(Single, Single, Single, Single)

Postconcats the matrix with the specified scale.

PostSkew(Single, Single)

Postconcats the matrix with the specified skew.

PostSkew(Single, Single, Single, Single)

Postconcats the matrix with the specified skew.

PostTranslate(Single, Single)

Postconcats the matrix with the specified translation.

PreConcat(Matrix)

Preconcats the matrix with the specified matrix.

PreRotate(Single)

Preconcats the matrix with the specified rotation.

PreRotate(Single, Single, Single)

Preconcats the matrix with the specified rotation.

PreScale(Single, Single)

Preconcats the matrix with the specified scale.

PreScale(Single, Single, Single, Single)

Preconcats the matrix with the specified scale.

PreSkew(Single, Single)

Preconcats the matrix with the specified skew.

PreSkew(Single, Single, Single, Single)

Preconcats the matrix with the specified skew.

PreTranslate(Single, Single)

Preconcats the matrix with the specified translation.

RectStaysRect()

Returns true if will map a rectangle to another rectangle.

Reset()

Set the matrix to identity

Set(Matrix)

(deep) copy the src matrix into this matrix.

SetConcat(Matrix, Matrix)

Set the matrix to the concatenation of the two specified matrices and return true.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetPolyToPoly(Single[], Int32, Single[], Int32, Int32)

Set the matrix such that the specified src points would map to the specified dst points.

SetRectToRect(RectF, RectF, Matrix+ScaleToFit)

Set the matrix to the scale and translate values that map the source rectangle to the destination rectangle, returning true if the the result can be represented.

SetRotate(Single)

Set the matrix to rotate about (0,0) by the specified number of degrees.

SetRotate(Single, Single, Single)

Set the matrix to rotate by the specified number of degrees, with a pivot point at (px, py).

SetScale(Single, Single)

Set the matrix to scale by sx and sy.

SetScale(Single, Single, Single, Single)

Set the matrix to scale by sx and sy, with a pivot point at (px, py).

SetSinCos(Single, Single)

Set the matrix to rotate by the specified sine and cosine values.

SetSinCos(Single, Single, Single, Single)

Set the matrix to rotate by the specified sine and cosine values, with a pivot point at (px, py).

SetSkew(Single, Single)

Set the matrix to skew by sx and sy.

SetSkew(Single, Single, Single, Single)

Set the matrix to skew by sx and sy, with a pivot point at (px, py).

SetTranslate(Single, Single)

Set the matrix to translate by (dx, dy).

SetValues(Single[])

Copy 9 values from the array into the matrix.

ToArray<T>() (Inherited from Object)
ToShortString()
ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

IJavaObjectEx.IsProxy (Inherited from Object)
IJavaObjectEx.KeyHandle (Inherited from Object)
IJavaObjectEx.NeedsActivation (Inherited from Object)
IJavaObjectEx.ToLocalJniHandle() (Inherited from Object)
IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to