Difference between revisions of "Component: GLCD Bitmap Drawer ROM (Graphical Library)"

From Flowcode Help
Jump to navigationJump to search
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_GLCD_Draw_Bitmap.fcfx FC_Comp_Source_GLCD_Draw_Bitmap.fcfx]
+
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_Lib_Draw_Bitmap.fcfx FC_Comp_Source_Lib_Draw_Bitmap.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 34: Line 36:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 222: Line 226:
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | gLCD Object
+
| width="90%" | LinkTo
 
|-
 
|-
| colspan="2" | Graphical LCD Object to draw the bitmap image to 
+
| colspan="2" |  
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]

Revision as of 14:41, 16 January 2023

Author Matrix TSL
Version 2.2
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

Component Source Code

Please click here for the component source code: FC_Comp_Source_Lib_Draw_Bitmap.fcfx

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.

BitmapDrawerProp.jpg


Here is an example which loops drawing a monochrome and 24-bit bitmaps to the EBM001 graphical display.

FC6 Icon.png Bitmap Drawer Demo

The bitmap files used in the example can be found here.

ZIP Icon.png Bitmap Drawer Files


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.

FC6 Icon.png Bitmap Drawer Demo 2

The bitmap files used in the example can be found here.

ZIP Icon.png Bitmap Drawer Files 2


Downloadable macro reference

Fc9-comp-macro.png GetHeight
Returns the height of the loaded bitmap file in pixels. 
Fc9-u8-icon.png - BYTE BitmapIndex
Selects from attached bitmaps. Range: 0-9 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png GetWidth
Returns the width of the loaded bitmap file in pixels. 
Fc9-u8-icon.png - BYTE BitmapIndex
Selects from attached bitmaps. Range: 0-9 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png SetTransparentColour
Sets the transparency colour, the colour that is not drawn when transparency is enabled. 
Fc9-u8-icon.png - BYTE R
 
Fc9-u8-icon.png - BYTE G
 
Fc9-u8-icon.png - BYTE B
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Display_BMP
Draws the bitmap image from ROM onto the display at the corrdinates X and Y. 
Fc9-u8-icon.png - BYTE BitmapIndex
Selects from attached bitmaps. Range: 0-9 
Fc9-u16-icon.png - UINT X
X Axis coordinate, specifies the location of the left edge of the bitmap image 
Fc9-u16-icon.png - UINT Y
Y Axis coordinate, specifies the location of the top edge of the bitmap image 
Fc9-u8-icon.png - BYTE Orientation
0=Normal, 1=90 Degrees CW, 2=180 Degrees, 3=270 Degrees CW 
Fc9-u8-icon.png - BYTE Transparency
0=Off, 1=On Don't Draw Any Pixels which match the transparent colour 
Fc9-u8-icon.png - BYTE Flip
0=Normal, 1=FlipWidth, 2=FlipHeight, 3=FlipBoth 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Display_BMP_Fast
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. Currently only supports colour displays. 
Fc9-u8-icon.png - BYTE BitmapIndex
Selects from attached bitmaps. Range: 0-9 
Fc9-u16-icon.png - UINT X
X Axis coordinate, specifies the location of the left edge of the bitmap image 
Fc9-u16-icon.png - UINT Y
Y Axis coordinate, specifies the location of the top edge of the bitmap image 
Fc9-u8-icon.png - BYTE Transparency
0=Off, 1=On Don't Draw Any Pixels which match the transparent colour 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png LinkTo
 
Fc9-type-7-icon.png ColourDisplay
Automatically detects if the graphical LCD object is colour or monochrome 
Fc9-type-21-icon.png ROM Bytes
Total number of ROM bytes used to store attached bitmap images. 
Fc9-type-16-icon.png Number of Bitmaps
Number of bitmaps the component can store and draw to the LCD. Min 1 / Max 10 
Fc9-conn-icon.png Bitmap 0
Fc9-type-13-icon.png Bitmap File
Bitmap file you wish to embed into the program. Compatible with .bmp files in the following formats: 24-Bit / 256 Colour / 16 Colour / Monochrome 
Fc9-type-21-icon.png File Colour Depth
Number of bits per pixel. Currently the component only supports bitmap files with 1-bit or 24-bit colour depth. 
Fc9-type-21-icon.png File Length
The number of bytes of ROM the bitmap file will consume. You can vie wthe number of ROM bytes available on your target device using the Device Helper component. 
Fc9-type-21-icon.png File Width
Width of the bitmap file in pixels 
Fc9-type-21-icon.png File Height
Height of the bitmap file in pixels 
Fc9-type-21-icon.png Data Offset
Offset in the file where the bitmap pixel data starts