Some of The Graphics Features
Some of The Graphics Features
initwindow(width,height);
l
or,
kbhit();
setcolor(color);
Set Background Color (usually for text)
setbkcolor(color);
Set Fill Style and Color (for interiors)
l
setfillstyle(pattern, color)
Set Line Style and Thickness
l
DrawingLines
l
Drawing a line
l
lineto(x,y);
l Drawing relative (a delta amount from the current position)
l
linerel(deltax,deltay);
l Drawing absolute (from one coordinate to another)
linerel(from_x, from_y, to_x, to_y);
DrawingAreas
l
Drawing a Circle
l
Text Formatting
l
settextjustify(horizontal, vertical)
l Set the text style
Font: (0-11)
l Direction: 0 = left to right direction
l Character Size: 0 = normal, 6 is really big!
l
Text Output
Set Text color (index ranges 0-15)
setcolor(index);
l Output a message on the graphics window
at the current position
outtext(messages on graphics window);
l Output a message on the graphics window
at the given x,y coordinate
outtextxy(x,y,message);
l
Mouse Input!
l
answer = ismouseclick(kind)
l
clearmouseclick(kind);
l
y = mousey();