/// <summary> /// Set this colormatrix to the concatenation of the two specified /// colormatrices, such that the resulting colormatrix has the same effect /// as applying matB and then applying matA. /// </summary> /// <remarks> /// Set this colormatrix to the concatenation of the two specified /// colormatrices, such that the resulting colormatrix has the same effect /// as applying matB and then applying matA. It is legal for either matA or /// matB to be the same colormatrix as this. /// </remarks> public virtual void setConcat(android.graphics.ColorMatrix matA, android.graphics.ColorMatrix matB) { float[] tmp = null; if (matA == this || matB == this) { tmp = new float[20]; } else { tmp = mArray; } float[] a = matA.mArray; float[] b = matB.mArray; int index = 0; { for (int j = 0; j < 20; j += 5) { { for (int i = 0; i < 4; i++) { tmp[index++] = a[j + 0] * b[i + 0] + a[j + 1] * b[i + 5] + a[j + 2] * b[i + 10] + a[j + 3] * b[i + 15]; } } tmp[index++] = a[j + 0] * b[4] + a[j + 1] * b[9] + a[j + 2] * b[14] + a[j + 3] * b[19] + a[j + 4]; } } if (tmp != mArray) { System.Array.Copy(tmp, 0, mArray, 0, 20); } }
public virtual void set(android.graphics.ColorMatrix arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::android.graphics.ColorMatrix._set3286, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.graphics.ColorMatrix.staticClass, global::android.graphics.ColorMatrix._set3286, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } }
public ColorMatrixColorFilter(android.graphics.ColorMatrix arg0) : base(global::MonoJavaBridge.JNIEnv.ThreadEnv) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(android.graphics.ColorMatrixColorFilter.staticClass, global::android.graphics.ColorMatrixColorFilter._ColorMatrixColorFilter3300, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); Init(@__env, handle); }
/// <summary>Assign the src colormatrix into this matrix, copying all of its values.</summary> /// <remarks>Assign the src colormatrix into this matrix, copying all of its values.</remarks> public virtual void set(android.graphics.ColorMatrix src) { System.Array.Copy(src.mArray, 0, mArray, 0, 20); }
/// <summary>Create a new colormatrix initialized with the specified colormatrix.</summary> /// <remarks>Create a new colormatrix initialized with the specified colormatrix.</remarks> public ColorMatrix(android.graphics.ColorMatrix src) { System.Array.Copy(src.mArray, 0, mArray, 0, 20); }
/// <summary>Concat this colormatrix with the specified postmatrix.</summary> /// <remarks> /// Concat this colormatrix with the specified postmatrix. This is logically /// the same as calling setConcat(postmatrix, this); /// </remarks> public virtual void postConcat(android.graphics.ColorMatrix postmatrix) { setConcat(postmatrix, this); }
/// <summary>Concat this colormatrix with the specified prematrix.</summary> /// <remarks> /// Concat this colormatrix with the specified prematrix. This is logically /// the same as calling setConcat(this, prematrix); /// </remarks> public virtual void preConcat(android.graphics.ColorMatrix prematrix) { setConcat(this, prematrix); }
/// <summary>Create a colorfilter that transforms colors through a 4x5 color matrix.</summary> /// <remarks>Create a colorfilter that transforms colors through a 4x5 color matrix.</remarks> /// <param name="matrix"> /// 4x5 matrix used to transform colors. It is copied into /// the filter, so changes made to the matrix after the filter /// is constructed will not be reflected in the filter. /// </param> public ColorMatrixColorFilter(android.graphics.ColorMatrix matrix) { float[] colorMatrix = matrix.getArray(); native_instance = nativeColorMatrixFilter(colorMatrix); nativeColorFilter = nColorMatrixFilter(native_instance, colorMatrix); }