Bitmap.GetPixel(Int32, Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回 Color 指定位置。
[Android.Runtime.Register("getPixel", "(II)I", "")]
public int GetPixel(int x, int y);
[<Android.Runtime.Register("getPixel", "(II)I", "")>]
member this.GetPixel : int * int -> int
参数
- x
- Int32
要返回的像素的 x 坐标 (0...width-1)
- y
- Int32
要返回的像素的 y 坐标 (0...height-1)
返回
指定坐标处的 argb Color
- 属性
例外
如果 x,则 y 超过位图边界
注解
返回 Color 指定位置。 如果 x 或 y 超出边界(负或 >= 分别超出宽度或高度),则引发异常。 返回的颜色是颜色空间中的 ColorSpace.Named#SRGB sRGB 非预乘 ARGB 值。
Java文档android.graphics.Bitmap.getPixel(int, int)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。