|
|
(11 intermediate revisions by 2 users not shown) |
Line 14: |
Line 14: |
| ==GLCD Bitmap Drawer FAT component== | | ==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 | | 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 |
− |
| |
− | ==Component Source Code==
| |
− |
| |
− | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Lib_Draw_Bitmap_FAT.fcfx FC_Comp_Source_Lib_Draw_Bitmap_FAT.fcfx]
| |
− |
| |
− | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Lib_Draw_Bitmap_FAT.fcfx FC_Comp_Source_Lib_Draw_Bitmap_FAT.fcfx]
| |
| | | |
| ==Detailed description== | | ==Detailed description== |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
| | | |
| ''No detailed description exists yet for this component'' | | ''No detailed description exists yet for this component'' |
Line 35: |
Line 21: |
| ==Examples== | | ==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. |
| | | |
| + | {{Zip|BitmapDrawer_File_Demo.zip|Bitmap Drawer File Demo}} |
| | | |
| | | |
| + | 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. |
| | | |
| | | |
| | | |
| | | |
− | ''<span style="color:red;">No additional examples</span>''
| |
| | | |
| ==Macro reference== | | ==Macro reference== |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| + | ===Display_BMP=== |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHeight'''
| |
− | |-
| |
− | | colspan="2" | Returns the height of the loaded bitmap file in pixels.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| |
− | | width="90%" | Filename
| |
− | |-
| |
− | | colspan="2" | The filename of the bitmap we want to measure
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| 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;" | '''GetWidth'''
| |
− | |-
| |
− | | colspan="2" | Returns the width of the loaded bitmap file in pixels.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| |
− | | width="90%" | Filename
| |
− | |-
| |
− | | colspan="2" | The filename of the bitmap we want to measure
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| 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;" | '''SetTransparentColour'''
| |
− | |-
| |
− | | colspan="2" | Sets the transparency colour, the colour that is not drawn when transparency is enabled.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | R
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | G
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | B
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 116: |
Line 44: |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Display_BMP''' | | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Display_BMP''' |
| |- | | |- |
− | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. Return Values: 0=OK, 1=ColourDepthNotSupported, 237=FileNotFound | + | | colspan="2" | Draws the bitmap image onto the display at the corrdinates X and Y. Return Values: 0=OK, 1=ColourDepthNotSupported, 237=FileNotFound |
| |- | | |- |
| |- | | |- |
Line 154: |
Line 82: |
| | | |
| | | |
| + | ===Display_BMP_Fast=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 159: |
Line 88: |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Display_BMP_Fast''' | | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Display_BMP_Fast''' |
| |- | | |- |
− | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. Attempts to draw a row at a time by not forcing coordinates for every pixel so may not work on some displays. Return Values: 0=OK, 1=ColourDepthNotSupported, 237=FileNotFound | + | | colspan="2" | Draws the bitmap image onto the display at the corrdinates X and Y. Speeds up drawing by not assigning X/Y coordinate for each pixel. Return Values: 0=OK, 1=ColourDepthNotSupported, 237=FileNotFound |
| |- | | |- |
| |- | | |- |
Line 177: |
Line 106: |
| | colspan="2" | Y Axis coordinate, specifies the location of the top edge of the bitmap image | | | 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="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
− | | width="90%" | Orientation | + | | width="90%" | Mode |
− | |-
| |
− | | 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="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | | |
− | | |
− | ==Property reference==
| |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | GLCD LinkTo
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | File LinkTo
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
− | | width="90%" | ColourDisplay
| |
− | |-
| |
− | | colspan="2" | Automatically detects if the graphical LCD object is colour or monochrome
| |
− | |}==Macro reference==
| |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | + | | colspan="2" | 0=RowByRow, 1=FullWindow(Y Flipped) |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetHeight'''
| |
− | |-
| |
− | | colspan="2" | Returns the height of the loaded bitmap file in pixels.
| |
| |- | | |- |
− | |-
| + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
− | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| |
− | | width="90%" | Filename
| |
− | |-
| |
− | | colspan="2" | The filename of the bitmap we want to measure
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| 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;" | '''GetWidth'''
| |
− | |-
| |
− | | colspan="2" | Returns the width of the loaded bitmap file in pixels.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| |
− | | width="90%" | Filename
| |
− | |-
| |
− | | colspan="2" | The filename of the bitmap we want to measure
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| 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;" | '''SetTransparentColour'''
| |
− | |-
| |
− | | colspan="2" | Sets the transparency colour, the colour that is not drawn when transparency is enabled.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | R
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | G
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | B
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| 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'''
| |
− | |-
| |
− | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. 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%" | 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="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| 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'''
| |
− | |-
| |
− | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. Attempts to draw a row at a time by not forcing coordinates for every pixel so may not work on some displays. 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%" | Orientation | | | width="90%" | Orientation |
| |- | | |- |
− | | colspan="2" | 0=Normal, 1=90 Degrees CW, 2=180 Degrees, 3=270 Degrees CW | + | | colspan="2" | 0=Default, 1=Rotated 90 Degrees (only works with Mode 0) |
− | |-
| |
− | | 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 |
Line 373: |
Line 121: |
| | | |
| | | |
− | | + | ===GetHeight=== |
− | | |
− | ==Property reference== | |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | GLCD LinkTo
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | File LinkTo
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
− | | width="90%" | ColourDisplay
| |
− | |-
| |
− | | colspan="2" | Automatically detects if the graphical LCD object is colour or monochrome
| |
− | |}==Macro reference==
| |
− | | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 417: |
Line 140: |
| | | |
| | | |
| + | ===GetWidth=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 435: |
Line 159: |
| | | |
| | | |
| + | ===SetTransparentColour=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 461: |
Line 186: |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
− |
| |
− |
| |
− | {| 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'''
| |
− | |-
| |
− | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. 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%" | 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="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− |
| |
− |
| |
− | {| 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'''
| |
− | |-
| |
− | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. Attempts to draw a row at a time by not forcing coordinates for every pixel so may not work on some displays. 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%" | 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="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− |
| |
− |
| |
| | | |
| | | |
Line 573: |
Line 210: |
| |- | | |- |
| | colspan="2" | Automatically detects if the graphical LCD object is colour or monochrome | | | colspan="2" | Automatically detects if the graphical LCD object is colour or monochrome |
− | |}==Macro reference==
| |
− |
| |
− | {| 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;" | '''GetHeight'''
| |
− | |-
| |
− | | colspan="2" | Returns the height of the loaded bitmap file in pixels.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| |
− | | width="90%" | Filename
| |
− | |-
| |
− | | colspan="2" | The filename of the bitmap we want to measure
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |} | | |} |
| | | |
| + | ==Component Source Code== |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Lib_Draw_Bitmap_FAT.fcfx FC_Comp_Source_Lib_Draw_Bitmap_FAT.fcfx] |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetWidth'''
| |
− | |-
| |
− | | colspan="2" | Returns the width of the loaded bitmap file in pixels.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| |
− | | width="90%" | Filename
| |
− | |-
| |
− | | colspan="2" | The filename of the bitmap we want to measure
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
| | | |
− | | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Lib_Draw_Bitmap_FAT.fcfx FC_Comp_Source_Lib_Draw_Bitmap_FAT.fcfx] |
− | {| 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;" | '''SetTransparentColour'''
| |
− | |-
| |
− | | colspan="2" | Sets the transparency colour, the colour that is not drawn when transparency is enabled.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | R
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | G
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | B
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| 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'''
| |
− | |-
| |
− | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. 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%" | 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="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | {| 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'''
| |
− | |-
| |
− | | colspan="2" | Draws the bitmap image from ROM onto the display at the corrdinates X and Y. Attempts to draw a row at a time by not forcing coordinates for every pixel so may not work on some displays. 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%" | 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="90%" style="border-top: 2px solid #000;" | ''Return''
| |
− | |}
| |
− | | |
− | | |
− | | |
− | | |
− | ==Property reference==
| |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | GLCD LinkTo
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | File LinkTo
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
− | | width="90%" | ColourDisplay
| |
− | |-
| |
− | | colspan="2" | Automatically detects if the graphical LCD object is colour or monochrome
| |
− | |}
| |