Language:
Русский
English
{Getpixel.PAS}
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
{Sample code for the GetPixel function.}
uses Graph;
var
Gd, Gm: Integer;
PixelColor: Word;
begin
Gd := Detect;
InitGraph(Gd, Gm, '');
if GraphResult <> grOk then
Halt(1);
PixelColor := GetPixel(10, 10);
if PixelColor = 0 then
PutPixel(10, 10, GetMaxColor);
Readln;
CloseGraph;
end.