Esempio n. 1
0
 /// <summary>Create a new compose shader, given shaders A, B, and a combining mode.</summary>
 /// <remarks>
 /// Create a new compose shader, given shaders A, B, and a combining mode.
 /// When the mode is applied, it will be given the result from shader A as its
 /// "dst", and the result from shader B as its "src".
 /// </remarks>
 /// <param name="shaderA">The colors from this shader are seen as the "dst" by the mode
 ///     </param>
 /// <param name="shaderB">The colors from this shader are seen as the "src" by the mode
 ///     </param>
 /// <param name="mode">
 /// The mode that combines the colors from the two shaders. If mode
 /// is null, then SRC_OVER is assumed.
 /// </param>
 public ComposeShader(android.graphics.Shader shaderA, android.graphics.Shader shaderB
                      , android.graphics.Xfermode mode)
 {
     mShaderA        = shaderA;
     mShaderB        = shaderB;
     native_instance = nativeCreate1(shaderA.native_instance, shaderB.native_instance,
                                     (mode != null) ? mode.native_instance : null);
     if (mode is android.graphics.PorterDuffXfermode)
     {
         android.graphics.PorterDuff.Mode pdMode = ((android.graphics.PorterDuffXfermode)mode
                                                    ).mode;
         native_shader = nativePostCreate2(native_instance, shaderA.native_shader, shaderB
                                           .native_shader, pdMode != null ? (int)pdMode : 0);
     }
     else
     {
         native_shader = nativePostCreate1(native_instance, shaderA.native_shader, shaderB
                                           .native_shader, mode != null ? mode.native_instance : null);
     }
 }
Esempio n. 2
0
		/// <summary>
		/// Set all class variables using current values from the given
		/// <see cref="Paint">Paint</see>
		/// .
		/// </summary>
		private void setClassVariablesFrom(android.graphics.Paint paint)
		{
			mColorFilter = paint.mColorFilter;
			mMaskFilter = paint.mMaskFilter;
			mPathEffect = paint.mPathEffect;
			mRasterizer = paint.mRasterizer;
			mShader = paint.mShader;
			mTypeface = paint.mTypeface;
			mXfermode = paint.mXfermode;
			mHasCompatScaling = paint.mHasCompatScaling;
			mCompatScaling = paint.mCompatScaling;
			mInvCompatScaling = paint.mInvCompatScaling;
			hasShadow = paint.hasShadow;
			shadowDx = paint.shadowDx;
			shadowDy = paint.shadowDy;
			shadowRadius = paint.shadowRadius;
			shadowColor = paint.shadowColor;
			mBidiFlags = paint.mBidiFlags;
		}
Esempio n. 3
0
		/// <summary>Set or clear the xfermode object.</summary>
		/// <remarks>
		/// Set or clear the xfermode object.
		/// <p />
		/// Pass null to clear any previous xfermode.
		/// As a convenience, the parameter passed is also returned.
		/// </remarks>
		/// <param name="xfermode">May be null. The xfermode to be installed in the paint</param>
		/// <returns>xfermode</returns>
		public virtual android.graphics.Xfermode setXfermode(android.graphics.Xfermode xfermode
			)
		{
			android.graphics.Xfermode.NativeXfermode xfermodeNative = null;
			if (xfermode != null)
			{
				xfermodeNative = xfermode.native_instance;
			}
			native_setXfermode(mNativePaint, xfermodeNative);
			mXfermode = xfermode;
			return xfermode;
		}
Esempio n. 4
0
 public ComposeShader(android.graphics.Shader arg0, android.graphics.Shader arg1, android.graphics.Xfermode arg2)  : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
 {
     global::MonoJavaBridge.JNIEnv         @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(android.graphics.ComposeShader.staticClass, global::android.graphics.ComposeShader._ComposeShader3303, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
     Init(@__env, handle);
 }