GUI procedures and functions
- unit GUI_Clear:procedure;
Clears the screen.
- unit GUI_ClearArea:procedure(x1,y1,w,h:integer);
Clears a rectangular area.
(x1,y1) - left corner of the rectangle
w - rect width
h - rect height
- unit GUI_Point:procedure(x,y,col:integer);
Draws a point at (x,y) with the color col.
- unit GUI_Move:procedure(x,y:integer);
Moves the graphic cursor to the position (x,y).
- unit GUI_Line:procedure(x1,y1,x2,y2,col:integer);
Draws a line from (x1,y1) to (x2,y2) with the color col.
- unit GUI_LineTo:procedure(x,y,col:integer);
Draws a line from actual position of the graphic cursor to the point
(x,y) with the color col.
- unit GUI_Rect:procedure(x1,y1,x2,y2,fcol,icol:integer);
Draws a rectangle.
(x1,y1) - left corner
(x2,y2) - right corner
fcol - frame color
icol - interior color
- unit GUI_Ellipse:procedure(x,y,a,b,sa,ea,fcol,icol:integer);
Draws an ellipse.
(x,y) - center point
a - horizontal radius
b - vertical radius
sa - start angle (in degrees)
ea - end angle
fcol - frame color
icol - interior color
- unit GUI_WriteInt:procedure(x,y,i,fcol,bcol:integer);
Writes integer i at position (x,y).
fcol - foreground color
bcol - background color
- unit GUI_WriteChar:procedure(x,y:integer;c:char;fcol,bcol:integer);
Writes character c at position (x,y).
fcol - foreground color
bcol - background color
- unit GUI_WriteReal:procedure(x,y:integer;r:real;fcol,bcol:integer);
Writes real r at position (x,y).
fcol - foreground color
bcol - background color
- unit GUI_WriteText:procedure(x,y:integer;t:array_of char;fcol,bcol:integer);
Writes text t at position (x,y).
fcol - foreground color
bcol - background color
- unit GUI_ReadText:function(x,y,fcol,bcol:integer):array_of char;
Reads text at position (x,y).
fcol - foreground color
bcol - background color
- unit GUI_ReadInt:function(x,y,fcol,bcol:integer):integer;
Reads integer at position (x,y).
fcol - foreground color
bcol - background color
- unit GUI_ReadChar:function(x,y,fcol,bcol:integer):char;
Reads character at position (x,y).
fcol - foreground color
bcol - background color
- unit GUI_ReadReal:function(x,y,fcol,bcol:integer):real;
Reads real at position (x,y).
fcol - foreground color
bcol - background color
- unit GUI_PutImgFile:procedure(x,y:integer;fname:string);
Loads the image from file fname (it could be .BMP, .GIF, .XPM file)
and puts it at position (x,y).
- unit GUI_GetImg:function(x,y,w,h:integer):array_of integer;
Gets the contents of the screen from position (x,y) and stores them in the array.
w - width of the image
h - height of the image
- unit GUI_PutImg:procedure(x,y:integer;map:array_of integer);
Puts an image from map at the position (x,y).
- unit GUI_KillImg:procedure(map:array_of integer);
Destroys an image from map. (This is a proper procedure to delete
a map stored by GUI_GetImg!)
- unit GUI_MousePressed:MOUSE procedure(INOUT x,y,btn:integer);
Checks if the mouse button was pressed.
(x,y) - mouse pointer position after press
btn - number of the mouse button: 0 - none, 1 - left, 2 - middle, 3 - right
- unit GUI_KeyPressed:function:integer;
Checks if the key was pressed. Returns the same value as the inkey
procedure.
Return to Index