int GetColorIndex(
int x
)
Function GetColorIndex (
x As Integer
) As Integer
int GetColorIndex(
int x
)
abstract GetColorIndex :
x : int -> int
This method can be used only if Indexed is set in the PixelFormat of the parent IWritableBitmapData. Otherwise, this method throws an InvalidOperationException.
To set the actual color of the pixel at the x coordinate you can use the GetColor.../GetPColor... methods or the indexer, or you can call the Palette.GetColor method with the return value of this method on the Palette instance returned by the Palette property of the parent IReadableBitmapData.
ArgumentOutOfRangeException | x is less than zero or is greater than or equal to the Width of the parent IReadableBitmapData. |
InvalidOperationException | This IReadableBitmapDataRow does not belong to a row of an indexed IReadableBitmapData. |