ColorObject.GetComponent(Int32) 方法

定义

返回此颜色的颜色空间定义的区域中指定组件的值(见 ColorSpace#getMinValue(int)ColorSpace#getMaxValue(int))。

[Android.Runtime.Register("getComponent", "(I)F", "GetGetComponent_IHandler", ApiSince=26)]
public virtual float GetComponent (int component);
[<Android.Runtime.Register("getComponent", "(I)F", "GetGetComponent_IHandler", ApiSince=26)>]
abstract member GetComponent : int -> single
override this.GetComponent : int -> single

参数

component
Int32

返回

属性

注解

返回此颜色的颜色空间定义的区域中指定组件的值(见 ColorSpace#getMinValue(int)ColorSpace#getMaxValue(int))。

如果请求的组件索引为 #getComponentCount(),此方法将返回 alpha 分量,始终位于 \([0..1]\) 范围内。

适用于 . 的 android.graphics.Color.getComponent(int)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于