Click or drag to resize

ImageSetPixel Method

Sets the Color of the pixel at (x, y) if the image is locked. Example:

var img = Image.new()
img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
img.lock()
img.set_pixel(x, y, color) # Works
img.unlock()
img.set_pixel(x, y, color) # Does not have an effect

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void SetPixel(
	int x,
	int y,
	Color color
)

Parameters

x
Type: SystemInt32

[Missing <param name="x"/> documentation for "M:Godot.Image.SetPixel(System.Int32,System.Int32,Godot.Color)"]

y
Type: SystemInt32

[Missing <param name="y"/> documentation for "M:Godot.Image.SetPixel(System.Int32,System.Int32,Godot.Color)"]

color
Type: GodotColor

[Missing <param name="color"/> documentation for "M:Godot.Image.SetPixel(System.Int32,System.Int32,Godot.Color)"]

See Also