10 lines
449 B
Plaintext
10 lines
449 B
Plaintext
PGraphics bitmap = createGraphics(100,100); // Create the bitmap
|
|
bitmap.beginDraw();
|
|
bitmap.background(255, 0, 0); // Fill bitmap with red rgb color
|
|
bitmap.endDraw();
|
|
image(bitmap, 0, 0); // Place bitmap on screen.
|
|
color b = color(0, 0, 255); // Define a blue rgb color
|
|
set(50, 50, b); // Set blue colored pixel in the middle of the screen
|
|
color c = get(50, 50); // Get the color of same pixel
|
|
if(b == c) print("Color changed correctly"); // Verify
|