Difference between revisions of "Component: GLCD Bitmap Drawer FAT (Graphical Library)"
| Line 120: | Line 120: | ||
|- | |- | ||
| colspan="2" | 0=Default, 1=Rotated 90 Degrees (only works with Mode 0) | | colspan="2" | 0=Default, 1=Rotated 90 Degrees (only works with Mode 0) | ||
| + | |- | ||
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===Display_BMP_Fast_Partial=== | ||
| + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Display_BMP_Fast_Partial''' | ||
| + | |- | ||
| + | | colspan="2" | Draws a partial bitmap image 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). Return Values: 0=OK, 1=ColourDepthNotSupported, 237=FileNotFound | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | ||
| + | | width="90%" | Filename | ||
| + | |- | ||
| + | | colspan="2" | Bitmap file to open from current directory on SD card 8.3 format | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" | X | ||
| + | |- | ||
| + | | colspan="2" | X Axis coordinate, specifies the location of the left edge of the bitmap image | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" | Y | ||
| + | |- | ||
| + | | colspan="2" | Y Axis coordinate, specifies the location of the top edge of the bitmap image | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | WidthPercent | ||
| + | |- | ||
| + | | colspan="2" | Percentage of bitmap width to draw. Range: 0-100 | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | HeightPercent | ||
| + | |- | ||
| + | | colspan="2" | Percentage of bitmap height to draw. Range: 0-100 | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | HorizontalSide | ||
| + | |- | ||
| + | | colspan="2" | Which horizontal side to draw from: 0=Left, 1=Right | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | VerticalSide | ||
| + | |- | ||
| + | | colspan="2" | Which vertical side to draw from: 0=Top, 1=Bottom | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | ||
| + | | width="90%" | Mode | ||
| + | |- | ||
| + | | colspan="2" | 0=RowByRow, 1=FullWindow(Y Flipped) | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | ||
| + | | width="90%" | Orientation | ||
| + | |- | ||
| + | | colspan="2" | 0=Default, 1=Rotated 90 Degrees (only works with Mode 0) | ||
| + | |- | ||
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===Display_BMP_Partial=== | ||
| + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Display_BMP_Partial''' | ||
| + | |- | ||
| + | | colspan="2" | Draws a partial bitmap image 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). Return Values: 0=OK, 1=ColourDepthNotSupported, 237=FileNotFound | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | ||
| + | | width="90%" | Filename | ||
| + | |- | ||
| + | | colspan="2" | Bitmap file to open from current directory on SD card 8.3 format | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" | X | ||
| + | |- | ||
| + | | colspan="2" | X Axis coordinate, specifies the location of the left edge of the bitmap image | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" | Y | ||
| + | |- | ||
| + | | colspan="2" | Y Axis coordinate, specifies the location of the top edge of the bitmap image | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | WidthPercent | ||
| + | |- | ||
| + | | colspan="2" | Percentage of bitmap width to draw. Range: 0-100 | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | HeightPercent | ||
| + | |- | ||
| + | | colspan="2" | Percentage of bitmap height to draw. Range: 0-100 | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | HorizontalSide | ||
| + | |- | ||
| + | | colspan="2" | Which horizontal side to draw from: 0=Left, 1=Right | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | VerticalSide | ||
| + | |- | ||
| + | | colspan="2" | Which vertical side to draw from: 0=Top, 1=Bottom | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Orientation | ||
| + | |- | ||
| + | | colspan="2" | 0=Normal, 1=90 Degrees CW, 2=180 Degrees, 3=270 Degrees CW | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Transparency | ||
| + | |- | ||
| + | | colspan="2" | 0=Off, 1=On Don't Draw Any Pixels which match the transparent colour | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Flip | ||
| + | |- | ||
| + | | colspan="2" | 0=Normal, 1=FlipWidth, 2=FlipHeight, 3=FlipBoth | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
Latest revision as of 21:01, 23 December 2025
| Author | Matrix TSL |
| Version | 3.0 |
| Category | Graphical Library |
Contents
GLCD Bitmap Drawer FAT component
A component to simplify the process of drawing bitmap images to a graphical display. Reads Bitmap files directly from a SD card formatted with a FAT file system. Compatible with 24-bit & 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 20, 1.0, 26-07-24, BR, Added pallet buffer allowing 4,8-bit bitmaps to function
Detailed description
No detailed description exists yet for this component
Examples
Here is an example that will scan for bitmap files in the root of the SD card and display them on a graphical display.
The zip file contains the Flowcode project as well as some example bitmap image files taken from Pixabay.
Place the bitmap files in the same folder as the project file for the simulation to work.
Place the bitmap files on the root of the SD card for the embedded hardware to work.
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. | |
| Filename | |
| The filename of the bitmap we want to measure | |
| Return | |
GetWidth
| GetWidth | |
| Returns the width of the loaded bitmap file in pixels. | |
| Filename | |
| The filename of the bitmap we want to measure | |
| Return | |
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_FAT.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Lib_Draw_Bitmap_FAT.fcfx