Paint.Alpha Property

Definition

Helper to getColor() that just returns the color's alpha value. -or- Helper to setColor(), that only assigns the color's alpha value, leaving its r,g,b values unchanged.

public virtual int Alpha { [Android.Runtime.Register("getAlpha", "()I", "GetGetAlphaHandler")] get; [Android.Runtime.Register("setAlpha", "(I)V", "GetSetAlpha_IHandler")] set; }
[<get: Android.Runtime.Register("getAlpha", "()I", "GetGetAlphaHandler")>]
[<set: Android.Runtime.Register("setAlpha", "(I)V", "GetSetAlpha_IHandler")>]
member this.Alpha : int with get, set

Property Value

the alpha component of the paint's color.

Attributes

Remarks

Property getter documentation:

Helper to getColor() that just returns the color's alpha value. This is the same as calling getColor() >>> 24. It always returns a value between 0 (completely transparent) and 255 (completely opaque).

Java documentation for android.graphics.Paint.getAlpha().

Property setter documentation:

Helper to setColor(), that only assigns the color's alpha value, leaving its r,g,b values unchanged. Results are undefined if the alpha value is outside of the range [0..255]

Java documentation for android.graphics.Paint.setAlpha(int).

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