Macaw OS C reference

Function pget

#include <macaw.h>
int pget(int x, int y);

Reads the colour of one pixel of the window, or of the picture you're drawing into.

Parameters

xint
How far the pixel is from the window's left edge, in pixels.
yint
How far the pixel is from the window's top, in pixels.

Returns int

The pixel's colour, from 0 to 255, or 0 if the pixel is outside the window.

In Drawing, with cls, pset, line, rect, rectfill, circ, circfill, tri, text, textwidth, clip, noclip, camera, box, centertext, shadowtext, textscaled, wraptext, wrapline.