Basic Gray 4 Lib v1.0
by CltGSoft
SUMMARY :
How to use Flib:
You only have to type, in a basic program usually,
bgraylib("command1" [,"command2",...])
example:
bgraylib("setplane(0)","foint:2","drawstr:10,20,4,Hello
world !!")
The list returned by bgraylib is stored in the variable
'graylist'.
Bgraylib will return the code of the key pressed .
See example include in the .zip file .
Info :
This librairie is the first one! It is possible in spite of the
many tests which it persists some bugs and errors. In this case,
we ask you to be so kind as to define the conditions and the
nature of the error and to send this to us (see the address in bottom of page) .
Graphical
functions:
The argument 'mode' is always optionnal, it will be replaced by 1
if it is omitted.
"setplane(0)"
Indicate the beginning of the first plan.
All the graphic functions below can be there to use. The plan
stops when there is the instruction " setplane(1)".
All what is in black in this plan willbe in clear gray! Except if
what is in black in this foreground isalso in the second, then
the final color will be black!
"setplane(1)"
Indicate the beginning of the second plan.
All the graphic functions below can be there to use. The plan
stops when there is no more instruction.
All what is in black in this plan will be in dark gray! Except if
what is in black in this second plan is also in the first, then
the final color will be black!
"clrscr"
Clears the screen.
"sprite:[x,][y,][mode,]pic"
Puts the bitmap pic to the screen at position (x, y).
mode can take the values:
x and y are
worth 0 by default.
"savpic:x1,y1,x2,y2,pic"
Saves in variable pic the part of the screen between the
points (x1, y1) and (x2, y2).
"picsize:pic"
Returns in a list the horizontal and vertical dimensions of pic.
"savscr:pic"
Saves the LCD screen and puts it in pic.
"rclscr:pic"
Restores the LCD screen saved in pic with 'savpic'.
"rect:x1,y1,x2,y2[,mode]"
Draws a empty rectangle with (x1, y1) and (x2,
y2) as corners.
mode can take the values:
In fact, if you're looking for
a particular effect, just try other arguments, you can have
rounded and inverted rectangles, double rectangles with the
corners cut...
Moreover, the values indicated above will draw white rectangles,
you'll have to add one of the three first values to draw a black
or inverted rectangle.
Ex: 97 ( = 64 + 32 + 1 ) for a black double rounded rectangle.
"fillrect:x1,y1,x2,y2[,mode]"
Draws a filled rectangle with (x1, y1) and (x2,
y2) as corners.
mode can take the values:
"filltri:x1,y1,x2,y2,x3,y3[,mode]"
Draws a filled triangle between the points (x1, y1),
(x2, y2) and (x3, y3).
mode can take the same values as 'line'.
"fillpoly:x1,y1,x2,y2,x3,y3,x4,y4[,mode]"
Draws a filled quadrilateral between the lines (x1, y1)-(x2,
y2) and (x3, y3)-(x4, y4).
The first line has to be nearer to the bottom of the screen than
the second one, or nothing will be drawn.
mode can take the same values as 'line'.
"ellipse:x,y,r1,r2[,mode]"
Draws an ellipse with center at (x, y), and with
semi axes r1 and r2.
mode can take the values:
"line:x1,y1,x2,y2[,mode]"
Draws a line between (x1, y1) and (x2, y2).
mode can take the values:
In fact, shadings will work
only with lines more than 45°.
"pix:x,y[,mode]"
Draws a pixel at (x, y).
mode can take the values:
"font:num"
Sets the current font.
num can take the values:
"drawstr:x,y,[mode,]str"
Prints the string str at (x, y).
If x is worth 999, the string will be centered
horizontally on the screen.
mode can take the values:
Attention, if you omit the
argument mode, str shouldn't begin with a number,
or Flib will think it is mode. Another solution is to
write a coma without any argument behind.
CONTACTS :
Internet web site : CltGSoft