Component: GLCD Bitmap Drawer ROM (Graphical Library): Difference between revisions
No edit summary |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 69: | Line 69: | ||
===Display_BMP=== | ===Display_BMP=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Display_BMP''' | ||
|- | |- | ||
| colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. | ||
| Line 113: | Line 113: | ||
===Display_BMP_Fast=== | ===Display_BMP_Fast=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Display_BMP_Fast''' | ||
|- | |- | ||
| colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. Speeds up drawing by not assigning X/Y coordinate for each pixel. Currently only supports colour displays. | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. Speeds up drawing by not assigning X/Y coordinate for each pixel. Currently only supports colour displays. | ||
| Line 147: | Line 147: | ||
===Display_BMP_Fast_Partial=== | ===Display_BMP_Fast_Partial=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Display_BMP_Fast_Partial''' | ||
|- | |- | ||
| colspan="2" | Draws a partial bitmap image from ROM onto the display at the coordinates X and Y. Speeds up drawing by not assigning X/Y coordinate for each pixel. Allows drawing a percentage of the bitmap width and height from a specified side (top/bottom, left/right). Currently only supports colour displays. | | colspan="2" | Draws a partial bitmap image from ROM onto the display at the coordinates X and Y. Speeds up drawing by not assigning X/Y coordinate for each pixel. Allows drawing a percentage of the bitmap width and height from a specified side (top/bottom, left/right). Currently only supports colour displays. | ||
| Line 201: | Line 201: | ||
===Display_BMP_Partial=== | ===Display_BMP_Partial=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Display_BMP_Partial''' | ||
|- | |- | ||
| colspan="2" | Draws a partial bitmap image from ROM onto the display at the coordinates X and Y. Allows drawing a percentage of the bitmap width and height from a specified side (top/bottom, left/right). | | colspan="2" | Draws a partial bitmap image from ROM onto the display at the coordinates X and Y. Allows drawing a percentage of the bitmap width and height from a specified side (top/bottom, left/right). | ||
| Line 265: | Line 265: | ||
===Display_Scaled_BMP=== | ===Display_Scaled_BMP=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Display_Scaled_BMP''' | ||
|- | |- | ||
| colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. Scales the bitmap to the specified width and height. | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. Scales the bitmap to the specified width and height. | ||
| Line 319: | Line 319: | ||
===Display_Scaled_BMP_Fast=== | ===Display_Scaled_BMP_Fast=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Display_Scaled_BMP_Fast''' | ||
|- | |- | ||
| colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. Scales the bitmap to the specified width and height. Speeds up drawing by not assigning X/Y coordinate for each pixel. Currently only supports colour displays. | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. Scales the bitmap to the specified width and height. Speeds up drawing by not assigning X/Y coordinate for each pixel. Currently only supports colour displays. | ||
| Line 363: | Line 363: | ||
===GetHeight=== | ===GetHeight=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetHeight''' | ||
|- | |- | ||
| colspan="2" | Returns the height of the loaded bitmap file in pixels. | | colspan="2" | Returns the height of the loaded bitmap file in pixels. | ||
| Line 382: | Line 382: | ||
===GetWidth=== | ===GetWidth=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetWidth''' | ||
|- | |- | ||
| colspan="2" | Returns the width of the loaded bitmap file in pixels. | | colspan="2" | Returns the width of the loaded bitmap file in pixels. | ||
| Line 401: | Line 401: | ||
===LookupFilename=== | ===LookupFilename=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''LookupFilename''' | ||
|- | |- | ||
| colspan="2" | Checks to see if one of the loaded files matches the supplied filename. If a match is found then returns the bitmap index 0-9. If no match is found then returns 255. | | colspan="2" | Checks to see if one of the loaded files matches the supplied filename. If a match is found then returns the bitmap index 0-9. If no match is found then returns 255. | ||
| Line 420: | Line 420: | ||
===SetTransparentColour=== | ===SetTransparentColour=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetTransparentColour''' | ||
|- | |- | ||
| colspan="2" | Sets the transparency colour, the colour that is not drawn when transparency is enabled. | | colspan="2" | Sets the transparency colour, the colour that is not drawn when transparency is enabled. | ||
| Line 450: | Line 450: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| Line 481: | Line 481: | ||
| colspan="2" | Reloads all bitmaps from source, useful to do when the bitmap files change. Will automatically reset to No when complete. | | colspan="2" | Reloads all bitmaps from source, useful to do when the bitmap files change. Will automatically reset to No when complete. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Bitmap 0 | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:36, 13 July 2026
| Author | Matrix TSL |
| Version | 3.0 |
| Category | Graphical Library |
GLCD Bitmap Drawer ROM component
A component to simplify the process of drawing bitmap images to a graphical display. Stores up to 10 bitmap images inside ROM based look up tables. Compatible with 24-bit / 256 Colour / 16 Colour / Monochrome Bitmaps. The gLCD object property specifies which LCD component to draw the bitmap to. Compatible with GLCD, NeoPixel, MIACv3, HT16K33
Version information
Library Version, Component Version, Date, Author, Info 13, 2.2, 22-07-24, BR, Updated Bitmap Mono Dummy Component - Testing 14, 2.3, 24-07-24, BR, Fixed a problem with file size reporting of 4/8 bit bitmaps 14, 2.3, 24-07-24, BR, Added Pallet size information for 4/8 bit bitmaps 15, 2.3, 24-07-24, BR, Reduced stored Pallet size by 1/4 16, 2.3, 26-07-24, BR, Added reload file property allowing for easier way to update bitmaps from source 17, 2.4, 12-08-24, BR, Added LookupFilename function to allow the component to work with DisplayManager
Detailed description
No detailed description exists yet for this component
Examples
The Bitmap Drawer component must be linked to the graphical LCD using the gLCD Object property.
Here is an example which loops drawing a monochrome and 24-bit bitmaps to the EBM001 graphical display.
The bitmap files used in the example can be found here.
Here is another example which overlays several monochrome images to give the impression of animation. Shows a pair of eyes, which can randomly and momentarily look left, right or blink.
The bitmap files used in the example can be found here.
Macro reference
Display_BMP
Display_BMP_Fast
Display_BMP_Fast_Partial
Display_BMP_Partial
Display_Scaled_BMP
Display_Scaled_BMP_Fast
GetHeight
| GetHeight | |
| Returns the height of the loaded bitmap file in pixels. | |
| BitmapIndex | |
| Selects from attached bitmaps. Range: 0-9 | |
| Return | |
GetWidth
| GetWidth | |
| Returns the width of the loaded bitmap file in pixels. | |
| BitmapIndex | |
| Selects from attached bitmaps. Range: 0-9 | |
| Return | |
LookupFilename
SetTransparentColour
| SetTransparentColour | |
| Sets the transparency colour, the colour that is not drawn when transparency is enabled. | |
| R | |
| G | |
| B | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Lib_Draw_Bitmap.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Lib_Draw_Bitmap.fcfx
