Language

RuntimeShader.SetWorkingColorSpace(ColorSpace) Method

Definition

Sets the working color space for this shader.

[Android.Runtime.Register("setWorkingColorSpace", "(Landroid/graphics/ColorSpace;)V", "GetSetWorkingColorSpace_Landroid_graphics_ColorSpace_Handler", ApiSince=37)]
public virtual void SetWorkingColorSpace(Android.Graphics.ColorSpace? colorSpace);
[<Android.Runtime.Register("setWorkingColorSpace", "(Landroid/graphics/ColorSpace;)V", "GetSetWorkingColorSpace_Landroid_graphics_ColorSpace_Handler", ApiSince=37)>]
abstract member SetWorkingColorSpace : Android.Graphics.ColorSpace -> unit
override this.SetWorkingColorSpace : Android.Graphics.ColorSpace -> unit

Parameters

colorSpace
ColorSpace

The ColorSpace to evaluate in. Must be an ColorSpace#getModel() RGB ColorSpace. Passing null restores default behavior of working in the destination colorspace.

Attributes

Remarks

Sets the working color space for this shader. That is, the shader will be evaluated in the given colorspace before being converted to the output destination's colorspace.

By default the RuntimeShader is evaluated in the context of the destination colorspace. By calling this method that can be overridden to force the shader to be evaluated in the given colorspace first before then being color converted to the destination colorspace.

Android reference for android.graphics.RuntimeShader.setWorkingColorSpace.

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