Function Image.setPixel

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

void setPixel (
  const(long) x,
  const(long) y,
  const(Color) color
) nothrow @nogc;

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