共用方式為


Bitmap.SetPixel(Int32, Int32, Color) 方法

定義

將指定的 Color 寫入位圖中(假設它是可變的),位於 x,y 座標。

[Android.Runtime.Register("setPixel", "(III)V", "")]
public void SetPixel (int x, int y, Android.Graphics.Color color);
[<Android.Runtime.Register("setPixel", "(III)V", "")>]
member this.SetPixel : int * int * Android.Graphics.Color -> unit

參數

x
Int32

要取代之像素的 X 座標 (0...width-1)

y
Int32

要取代之圖元的 Y 座標 (0...height-1)

color
Color

要寫入位圖的ARGB色彩

屬性

例外狀況

如果點圖不可變動,則為

如果 x,則為 y 不在點陣圖界限之外。

備註

將指定的 Color 寫入位圖中(假設它是可變的),位於 x,y 座標。 色彩必須是色彩空間中 ColorSpace.Named#SRGB sRGB 非預乘的ARGB值。

android.graphics.Bitmap.setPixel(int, int, int)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於