다음을 통해 공유


HardwareBufferRenderer.SetLightSourceAlpha(Single, Single) Method

Definition

Configures the ambient & spot shadow alphas.

[Android.Runtime.Register("setLightSourceAlpha", "(FF)V", "GetSetLightSourceAlpha_FFHandler", ApiSince=34)]
public virtual void SetLightSourceAlpha (float ambientShadowAlpha, float spotShadowAlpha);
[<Android.Runtime.Register("setLightSourceAlpha", "(FF)V", "GetSetLightSourceAlpha_FFHandler", ApiSince=34)>]
abstract member SetLightSourceAlpha : single * single -> unit
override this.SetLightSourceAlpha : single * single -> unit

Parameters

ambientShadowAlpha
Single

The alpha for the ambient shadow. If unsure, a reasonable default is 0.039f.

spotShadowAlpha
Single

The alpha for the spot shadow. If unsure, a reasonable default is 0.19f.

Attributes

Remarks

Configures the ambient & spot shadow alphas. This is the alpha used when the shadow has max alpha, and ramps down from the values provided to zero.

These values are typically provided by the current theme, see android.R.attr#spotShadowAlpha and android.R.attr#ambientShadowAlpha.

This must be set at least once along with #setLightSourceGeometry(float, float, float, float) before shadows will work.

Java documentation for android.graphics.HardwareBufferRenderer.setLightSourceAlpha(float, float).

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