Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
Glcd_Circle
Glcd_Set_Font
243
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
procedure Glcd_Circle(x_center: integer; y_center: integer;
radius: integer; color: byte);
Returns
Nothing.
Description
Draws a circle on Glcd.
Parameters : 
x_center
: x coordinate of the circle center. Valid values: 0..127 
y_center
: y coordinate of the circle center. Valid values: 0..63 
radius
: radius size 
color
: color parameter. Valid values: 0..2 
The parameter color determines the color of the circle line: 0 white, 1 black, and
2 inverts each dot.
Requires
Glcd needs to be initialized, see Glcd_Init routine.
Example
' Draw a circle with center in (50,50) and radius=10
Glcd_Circle(50, 50, 10, 1);
Prototype
procedure Glcd_Set_Font(const ActiveFont: ^byte; FontWidth: byte;
FontHeight: byte; FontOffs: word);
Returns
Nothing.
Description
Sets font that will be used with Glcd_Write_Char and Glcd_Write_Text routines.
Parameters : 
- activeFont: font to be set. Needs to be formatted as an array of byte 
- aFontWidth: width of the font characters in dots. 
- aFontHeight: height of the font characters in dots. 
- aFontOffs: number that represents difference between the mikroPascal PRO 
for AVR character set and regular ASCII set (eg. if 'A' is 65 in ASCII character, 
and 'A' is 45 in the mikroPascal PRO for AVR character set, aFontOffs is 20). 
Demo fonts supplied with the library have an offset of 32, which means that 
they start with space. 
The user can use fonts given in the file “__Lib_GLCDFonts.mpas” file located in
the Uses folder or create his own fonts.
Requires
Glcd needs to be initialized, see Glcd_Init routine.
Example
' Use the custom 5x7 font "myfont" which starts with space (32):
Glcd_Set_Font(myfont, 5, 7, 32);