View.SetLayerPaint(Paint) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Updates the Paint
object used with the current layer (used only if the current
layer type is not set to #LAYER_TYPE_NONE
).
[Android.Runtime.Register("setLayerPaint", "(Landroid/graphics/Paint;)V", "GetSetLayerPaint_Landroid_graphics_Paint_Handler")]
public virtual void SetLayerPaint (Android.Graphics.Paint? paint);
[<Android.Runtime.Register("setLayerPaint", "(Landroid/graphics/Paint;)V", "GetSetLayerPaint_Landroid_graphics_Paint_Handler")>]
abstract member SetLayerPaint : Android.Graphics.Paint -> unit
override this.SetLayerPaint : Android.Graphics.Paint -> unit
Parameters
- paint
- Paint
The paint used to compose the layer. This argument is optional
and can be null. It is ignored when the layer type is
#LAYER_TYPE_NONE
- Attributes
Remarks
Updates the Paint
object used with the current layer (used only if the current layer type is not set to #LAYER_TYPE_NONE
). Changed properties of the Paint provided to #setLayerType(int, android.graphics.Paint)
will be used the next time the View is redrawn, but #setLayerPaint(android.graphics.Paint)
must be called to ensure that the view gets redrawn immediately.
A layer is associated with an optional android.graphics.Paint
instance that controls how the layer is composed on screen. The following properties of the paint are taken into account when composing the layer:
<ul> <li>android.graphics.Paint#getAlpha() Translucency (alpha)
</li> <li>android.graphics.Paint#getXfermode() Blending mode
</li> <li>android.graphics.Paint#getColorFilter() Color filter
</li> </ul>
If this view has an alpha value set to < 1.0 by calling #setAlpha(float)
, the alpha value of the layer's paint is superseded by this view's alpha value.
Java documentation for android.view.View.setLayerPaint(android.graphics.Paint)
.
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
- <xref:Android.Views.View.SetLayerType(Android.Views.LayerType%2c+Android.Graphics.Paint)>