语言

Bitmap.GetColor(Int32, Int32) 方法

定义

返回 Color 指定位置。

[Android.Runtime.Register("getColor", "(II)Landroid/graphics/Color;", "", ApiSince=29)]
public Android.Graphics.ColorObject GetColor(int x, int y);
[<Android.Runtime.Register("getColor", "(II)Landroid/graphics/Color;", "", ApiSince=29)>]
member this.GetColor : int * int -> Android.Graphics.ColorObject

参数

x
Int32

要返回的像素的 x 坐标 (0...width-1)

y
Int32

要返回的像素的 y 坐标 (0...height-1)

返回

位于 Color 指定坐标处

特性

注解

返回 Color 指定位置。 如果 x 或 y 超出边界(负或 >= 分别超出宽度或高度),则引发异常。

Java文档android.graphics.Bitmap.getColor(int, int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于