Difference between revisions of "Component: GLCD Base (Graphical Library)"
(11 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
|- | |- | ||
| width="20%" style="color:gray;" | Version | | width="20%" style="color:gray;" | Version | ||
− | | | + | | 35.0 |
|- | |- | ||
| width="20%" style="color:gray;" | Category | | width="20%" style="color:gray;" | Category | ||
Line 16: | Line 16: | ||
==Version information== | ==Version information== | ||
+ | |||
+ | Library Version, Component Version, Date, Author, Info | ||
+ | 11, 1.0, 22-07-24, BR, Added DrawArc and DrawRoundedRectangle functions | ||
+ | |||
+ | Library Version, Component Version, Date, Author, Info | ||
+ | 33, 3.1, 13-06-24, BR, Added user selectable simulated mask for round displays | ||
+ | 34, 3.1, 17-07-24, MW, Fixed bug where Arc is not displyed when Resolution is 0 | ||
+ | 35, 35, 17-07-24, MW, Added an additioanl font count of 4 | ||
+ | 35, 35, 17-07-24, MW, Changed a variable type to allow larger font sizes | ||
==Detailed description== | ==Detailed description== | ||
Line 168: | Line 177: | ||
[[File:3DFar.jpg]] | [[File:3DFar.jpg]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 669: | Line 686: | ||
| colspan="2" | ASCII character for example 'A' or 65 | | colspan="2" | ASCII character for example 'A' or 65 | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| width="90%" | ByteIndex | | width="90%" | ByteIndex | ||
|- | |- | ||
Line 945: | Line 962: | ||
| colspan="2" | Font picker to decide which font to use on your display. | | colspan="2" | Font picker to decide which font to use on your display. | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] |
− | | width="90%" | | + | | width="90%" | Bytes Required |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Number of bytes required in program memory to store the selected font. |
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] |
− | | width="90%" | | + | | width="90%" | Character Spacing |
|- | |- | ||
− | | colspan="2" | Sets the number of | + | | colspan="2" | Sets the number of blank pixels between each character when printing text. |
|- | |- | ||
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
Line 988: | Line 1,005: | ||
|- | |- | ||
| colspan="2" | Specifies if the font set is included with the embedded downloadable code. Some display types have in an built font and text functions so the embedded font set can be disabled to reduce code overhead. For other display types the embedded font data should be enable to allow the print functions to work correctly. | | colspan="2" | Specifies if the font set is included with the embedded downloadable code. Some display types have in an built font and text functions so the embedded font set can be disabled to reduce code overhead. For other display types the embedded font data should be enable to allow the print functions to work correctly. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Embed Font Width | ||
+ | |- | ||
+ | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] |
Latest revision as of 08:59, 9 June 2025
Author | Matrix Ltd |
Version | 35.0 |
Category | Graphical Library |
Contents
- 1 GLCD Base component
- 2 Version information
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 BPlot
- 5.2 ClearDisplay
- 5.3 DrawArc
- 5.4 DrawCircle
- 5.5 DrawEllipse
- 5.6 DrawLine
- 5.7 DrawRectangle
- 5.8 DrawRoundedRectangle
- 5.9 FastPlot
- 5.10 Initialise
- 5.11 Plot
- 5.12 Print
- 5.13 PrintNumber
- 5.14 ReadFontByte
- 5.15 ReadFontStat
- 5.16 ReadFontWidth
- 5.17 SetBackgroundColour
- 5.18 SetDisplayOrientation
- 5.19 SetFontScaler
- 5.20 SetForegroundColour
- 5.21 Window
- 6 Property reference
- 7 Component Source Code
GLCD Base component
Base graphical LCD with simulation only interface to allow graphics to be drawn in simulation. Suitable for inheriting to simplify the creation of further graphical LCD components.
Version information
Library Version, Component Version, Date, Author, Info 11, 1.0, 22-07-24, BR, Added DrawArc and DrawRoundedRectangle functions
Library Version, Component Version, Date, Author, Info 33, 3.1, 13-06-24, BR, Added user selectable simulated mask for round displays 34, 3.1, 17-07-24, MW, Fixed bug where Arc is not displyed when Resolution is 0 35, 35, 17-07-24, MW, Added an additioanl font count of 4 35, 35, 17-07-24, MW, Changed a variable type to allow larger font sizes
Detailed description
Font sizes
Standard Fonts
0 = Normal
1 = 2 x Width
2 = 2 x Width and 2 x Height
3 = 2 x Height
Extended Fonts
4 = 2 x Width and 3 x Height
5 = 2 x Width and 4 x Height
6 = 2 x Width and 5 x Height
7 = 2 x Width and 6 x Height
8 = 3 x width
9 = 3 x Width and 2 x Height
10 = 3 x Width and 3 x Height
11 = 3 x Width and 4 x Height
12 = 3 x Width and 5 x Height
13 = 3 x Width and 6 x Height
14 = 4 x width
15 = 4 x Width and 2 x Height
16 = 4 x Width and 3 x Height
17 = 4 x Width and 4 x Height
18 = 4 x Width and 5 x Height
19 = 4 x Width and 6 x Height
20 = 5 x width
21 = 5 x Width and 2 x Height
22 = 5 x Width and 3 x Height
23 = 5 x Width and 4 x Height
24 = 5 x Width and 5 x Height
25 = 5 x Width and 6 x Height
26 = 6 x width
27 = 6 x Width and 2 x Height
28 = 6 x Width and 3 x Height
29 = 6 x Width and 4 x Height
30 = 6 x Width and 5 x Height
31 = 6 x Width and 6 x Height
Examples
EBM001 Basic Example
EBM001 gLCD Example File
Example should show the following on the display on the panel and on the hardware.
EBM001 Maze Builder
Example to draw a randomly generated 2D maze on an EBM001 graphical display.
EBM001 Drawing 3D Objects With Perspective
Example should show the following on the display on the panel and on the hardware. The two switches allow you to move closer to or away from the object. The perspective provides more and more distortion to the object the closer you get.
Macro reference
BPlot
![]() |
BPlot |
Sets a pixel with the current background colour at pixel location X, Y. | |
![]() |
X1 |
![]() |
Y1 |
![]() |
Return |
ClearDisplay
![]() |
ClearDisplay |
This macro clears the display of any previous output by overwriting the entire display with the background colour. | |
![]() |
Return |
DrawArc
DrawCircle
DrawEllipse
DrawLine
![]() |
DrawLine |
Draws a line with the current foreground colour from pixel location X1, Y1 to pixel location X2, Y2. | |
![]() |
X1 |
![]() |
Y1 |
![]() |
X2 |
![]() |
Y2 |
![]() |
Return |
DrawRectangle
DrawRoundedRectangle
FastPlot
![]() |
FastPlot |
Sets a pixel with the current foreground colour at current pixel location. | |
![]() |
Return |
Initialise
![]() |
Initialise |
The Init macro must be called once to initialise the Graphical LCD display before any other Graphical LCD component macros are called. | |
![]() |
Return |
Plot
![]() |
Plot |
Sets a pixel with the current foreground colour at pixel location X, Y. | |
![]() |
X1 |
![]() |
Y1 |
![]() |
Return |
PrintNumber
ReadFontByte
ReadFontStat
![]() |
ReadFontStat |
Gets a stat from the selected embedded ASCII font data. | |
![]() |
Font |
Font selection range: 0 to (NumFonts - 1) | |
![]() |
Index |
0=SpaceWidth, 1=PixelHeight | |
![]() |
Return |
ReadFontWidth
SetBackgroundColour
SetDisplayOrientation
SetFontScaler
![]() |
SetFontScaler |
![]() |
ScaleX |
![]() |
ScaleY |
![]() |
Return |
SetForegroundColour
Window
![]() |
Window |
Specifies a specific window in the pixels to draw to. | |
![]() |
X1 |
![]() |
Y1 |
![]() |
X2 |
![]() |
Y2 |
![]() |
Return |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_GLCD_base.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_GLCD_base.fcfx