Aracılığıyla paylaş


Bitmap.GetColor(Int32, Int32) Method

Definition

Returns the Color at the specified location.

[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

Parameters

x
Int32

The x coordinate (0...width-1) of the pixel to return

y
Int32

The y coordinate (0...height-1) of the pixel to return

Returns

The Color at the specified coordinate

Attributes

Remarks

Returns the Color at the specified location. Throws an exception if x or y are out of bounds (negative or >= to the width or height respectively).

Java documentation for android.graphics.Bitmap.getColor(int, int).

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