SurfaceControl.Builder.SetOpaque(Boolean) Method

Definition

Indicates whether the surface must be considered opaque, even if its pixel format is set to translucent. This can be useful if an application needs full RGBA 8888 support for instance but will still draw every pixel opaque. This flag only determines whether opacity will be sampled from the alpha channel. Plane-alpha from calls to setAlpha() can still result in blended composition regardless of the opaque setting. Combined effects are (assuming a buffer format with an alpha channel): OPAQUE + alpha(1.0) == opaque composition OPAQUE + alpha(0.x) == blended composition OPAQUE + alpha(0.0) == no composition !OPAQUE + alpha(1.0) == blended composition !OPAQUE + alpha(0.x) == blended composition !OPAQUE + alpha(0.0) == no composition If the underlying buffer lacks an alpha channel, it is as if setOpaque(true) were set automatically.

[Android.Runtime.Register("setOpaque", "(Z)Landroid/view/SurfaceControl$Builder;", "GetSetOpaque_ZHandler", ApiSince=29)]
public virtual Android.Views.SurfaceControl.Builder SetOpaque(bool opaque);
[<Android.Runtime.Register("setOpaque", "(Z)Landroid/view/SurfaceControl$Builder;", "GetSetOpaque_ZHandler", ApiSince=29)>]
abstract member SetOpaque : bool -> Android.Views.SurfaceControl.Builder
override this.SetOpaque : bool -> Android.Views.SurfaceControl.Builder

Parameters

opaque
Boolean

The System.Boolean value used for opaque.

Returns

The result of the set opaque operation.

Attributes

Remarks

For details, see the Android reference documentation for android.view.SurfaceControl.Builder.setOpaque.

Java documentation for android.view.SurfaceControl.Builder.setOpaque.

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