Compartir a través de


Paint.SetShadowLayer Method

Definition

Overloads

SetShadowLayer(Single, Single, Single, Int64)

This draws a shadow layer below the main layer, with the specified offset and color, and blur radius.

SetShadowLayer(Single, Single, Single, Color)

This draws a shadow layer below the main layer, with the specified offset and color, and blur radius.

SetShadowLayer(Single, Single, Single, Int64)

This draws a shadow layer below the main layer, with the specified offset and color, and blur radius.

[Android.Runtime.Register("setShadowLayer", "(FFFJ)V", "GetSetShadowLayer_FFFJHandler", ApiSince=29)]
public virtual void SetShadowLayer (float radius, float dx, float dy, long shadowColor);
[<Android.Runtime.Register("setShadowLayer", "(FFFJ)V", "GetSetShadowLayer_FFFJHandler", ApiSince=29)>]
abstract member SetShadowLayer : single * single * single * int64 -> unit
override this.SetShadowLayer : single * single * single * int64 -> unit

Parameters

radius
Single
dx
Single
dy
Single
shadowColor
Int64
Attributes

Remarks

This draws a shadow layer below the main layer, with the specified offset and color, and blur radius. If radius is 0, then the shadow layer is removed.

Can be used to create a blurred shadow underneath text. Support for use with other drawing operations is constrained to the software rendering pipeline.

The alpha of the shadow will be the paint's alpha if the shadow color is opaque, or the alpha from the shadow color if not.

Java documentation for android.graphics.Paint.setShadowLayer(float, float, float, long).

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

SetShadowLayer(Single, Single, Single, Color)

This draws a shadow layer below the main layer, with the specified offset and color, and blur radius.

[Android.Runtime.Register("setShadowLayer", "(FFFI)V", "GetSetShadowLayer_FFFIHandler")]
public virtual void SetShadowLayer (float radius, float dx, float dy, Android.Graphics.Color shadowColor);
[<Android.Runtime.Register("setShadowLayer", "(FFFI)V", "GetSetShadowLayer_FFFIHandler")>]
abstract member SetShadowLayer : single * single * single * Android.Graphics.Color -> unit
override this.SetShadowLayer : single * single * single * Android.Graphics.Color -> unit

Parameters

radius
Single
dx
Single
dy
Single
shadowColor
Color
Attributes

Remarks

This draws a shadow layer below the main layer, with the specified offset and color, and blur radius. If radius is 0, then the shadow layer is removed.

Can be used to create a blurred shadow underneath text. Support for use with other drawing operations is constrained to the software rendering pipeline.

The alpha of the shadow will be the paint's alpha if the shadow color is opaque, or the alpha from the shadow color if not.

Java documentation for android.graphics.Paint.setShadowLayer(float, float, float, 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