Component: Bitmap Drawer ROM (Displays: Graphical)

From Flowcode Help
Jump to navigationJump to search


Author Matrix TSL
Version 2.0 (Release)
Category Displays: Graphical


Image 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.

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

GetHeight

Returns the height of the loaded bitmap file in pixels.

Parameters

BYTE BitmapIndex
Selects from attached bitmaps. Range: 0-9


Return value

UINT


GetWidth

Returns the width of the loaded bitmap file in pixels.

Parameters

BYTE BitmapIndex
Selects from attached bitmaps. Range: 0-9


Return value

UINT


SetTransparentColour

Sets the transparency colour, the colour that is not drawn when transparency is enabled.

Parameters

BYTE R
BYTE G
BYTE B


Return value

This call does not return a value


Display_BMP

Draws the bitmap image from ROM onto the display at the corrdinates X and Y.

Parameters

BYTE BitmapIndex
Selects from attached bitmaps. Range: 0-9
UINT X
X Axis coordinate, specifies the location of the left edge of the bitmap image
UINT Y
Y Axis coordinate, specifies the location of the top edge of the bitmap image
BYTE Orientation
0=Normal, 1=90 Degrees CW, 2=180 Degrees, 3=270 Degrees CW
BYTE Transparency
0=Off, 1=On Don't Draw Any Pixels which match the transparent colour
BYTE Flip
0=Normal, 1=FlipWidth, 2=FlipHeight, 3=FlipBoth


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

gLCD Object

This property is of type Panel object and can be referenced with the variable name glcd_obj.

Graphical LCD Object to draw the bitmap image to

ColourDisplay

This property is of type True or false and can be referenced with the variable name Colour_Display.

Automatically detects if the graphical LCD object is colour or monochrome

ROM Bytes

This property is of type Unsigned integer and can be referenced with the variable name ROMusage.

Total number of ROM bytes used to store attached bitmap images.

Number of Bitmaps

This property is of type Fixed list of ints and can be referenced with the variable name NumBitmaps.

Number of bitmaps the component can store and draw to the LCD.

Min 1 / Max 10

Bitmap File

This property is of type Filename and can be referenced with the variable name bitmap_file0.

Bitmap file you wish to embed into the program.

Compatible with .bmp files in the following formats: 24-Bit / 256 Colour / 16 Colour / Monochrome

File Colour Depth

This property is of type Unsigned integer and can be referenced with the variable name ColourDepth0.

Number of bits per pixel.

Currently the component only supports bitmap files with 1-bit or 24-bit colour depth.

File Length

This property is of type Unsigned integer and can be referenced with the variable name file_Len0.

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.

File Width

This property is of type Unsigned integer and can be referenced with the variable name FileWidth0.

Width of the bitmap file in pixels

File Height

This property is of type Unsigned integer and can be referenced with the variable name FileHeight0.

Height of the bitmap file in pixels

Data Offset

This property is of type Unsigned integer and can be referenced with the variable name DataOffset0.

Offset in the file where the bitmap pixel data starts

Bitmap File

This property is of type Filename and can be referenced with the variable name bitmap_file1.

Bitmap file you wish to embed into the program.

Compatible with .bmp files in the following formats: 24-Bit / 256 Colour / 16 Colour / Monochrome

File Colour Depth

This property is of type Unsigned integer and can be referenced with the variable name ColourDepth1.

Number of bits per pixel.

Currently the component only supports bitmap files with 1-bit or 24-bit colour depth.

File Length

This property is of type Unsigned integer and can be referenced with the variable name file_Len1.

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.

File Width

This property is of type Unsigned integer and can be referenced with the variable name FileWidth1.

Width of the bitmap file in pixels

File Height

This property is of type Unsigned integer and can be referenced with the variable name FileHeight1.

Height of the bitmap file in pixels

Data Offset

This property is of type Unsigned integer and can be referenced with the variable name DataOffset1.

Offset in the file where the bitmap pixel data starts

Bitmap File

This property is of type Filename and can be referenced with the variable name bitmap_file2.

Bitmap file you wish to embed into the program.

Compatible with .bmp files in the following formats: 24-Bit / 256 Colour / 16 Colour / Monochrome

File Colour Depth

This property is of type Unsigned integer and can be referenced with the variable name ColourDepth2.

Number of bits per pixel.

Currently the component only supports bitmap files with 1-bit or 24-bit colour depth.

File Length

This property is of type Unsigned integer and can be referenced with the variable name file_Len2.

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.

File Width

This property is of type Unsigned integer and can be referenced with the variable name FileWidth2.

Width of the bitmap file in pixels

File Height

This property is of type Unsigned integer and can be referenced with the variable name FileHeight2.

Height of the bitmap file in pixels

Data Offset

This property is of type Unsigned integer and can be referenced with the variable name DataOffset2.

Offset in the file where the bitmap pixel data starts

Bitmap File

This property is of type Filename and can be referenced with the variable name bitmap_file3.

Bitmap file you wish to embed into the program.

Compatible with .bmp files in the following formats: 24-Bit / 256 Colour / 16 Colour / Monochrome

File Colour Depth

This property is of type Unsigned integer and can be referenced with the variable name ColourDepth3.

Number of bits per pixel.

Currently the component only supports bitmap files with 1-bit or 24-bit colour depth.

File Length

This property is of type Unsigned integer and can be referenced with the variable name file_Len3.

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.

File Width

This property is of type Unsigned integer and can be referenced with the variable name FileWidth3.

Width of the bitmap file in pixels

File Height

This property is of type Unsigned integer and can be referenced with the variable name FileHeight3.

Height of the bitmap file in pixels

Data Offset

This property is of type Unsigned integer and can be referenced with the variable name DataOffset3.

Offset in the file where the bitmap pixel data starts

Bitmap File

This property is of type Filename and can be referenced with the variable name bitmap_file4.

Bitmap file you wish to embed into the program.

Compatible with .bmp files in the following formats: 24-Bit / 256 Colour / 16 Colour / Monochrome

File Colour Depth

This property is of type Unsigned integer and can be referenced with the variable name ColourDepth4.

Number of bits per pixel.

Currently the component only supports bitmap files with 1-bit or 24-bit colour depth.

File Length

This property is of type Unsigned integer and can be referenced with the variable name file_Len4.

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.

File Width

This property is of type Unsigned integer and can be referenced with the variable name FileWidth4.

Width of the bitmap file in pixels

File Height

This property is of type Unsigned integer and can be referenced with the variable name FileHeight4.

Height of the bitmap file in pixels

Data Offset

This property is of type Unsigned integer and can be referenced with the variable name DataOffset4.

Offset in the file where the bitmap pixel data starts

Bitmap File

This property is of type Filename and can be referenced with the variable name bitmap_file5.

Bitmap file you wish to embed into the program.

Compatible with .bmp files in the following formats: 24-Bit / 256 Colour / 16 Colour / Monochrome

File Colour Depth

This property is of type Unsigned integer and can be referenced with the variable name ColourDepth5.

Number of bits per pixel.

Currently the component only supports bitmap files with 1-bit or 24-bit colour depth.

File Length

This property is of type Unsigned integer and can be referenced with the variable name file_Len5.

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.

File Width

This property is of type Unsigned integer and can be referenced with the variable name FileWidth5.

Width of the bitmap file in pixels

File Height

This property is of type Unsigned integer and can be referenced with the variable name FileHeight5.

Height of the bitmap file in pixels

Data Offset

This property is of type Unsigned integer and can be referenced with the variable name DataOffset5.

Offset in the file where the bitmap pixel data starts

Bitmap File

This property is of type Filename and can be referenced with the variable name bitmap_file6.

Bitmap file you wish to embed into the program.

Compatible with .bmp files in the following formats: 24-Bit / 256 Colour / 16 Colour / Monochrome

File Colour Depth

This property is of type Unsigned integer and can be referenced with the variable name ColourDepth6.

Number of bits per pixel.

Currently the component only supports bitmap files with 1-bit or 24-bit colour depth.

File Length

This property is of type Unsigned integer and can be referenced with the variable name file_Len6.

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.

File Width

This property is of type Unsigned integer and can be referenced with the variable name FileWidth6.

Width of the bitmap file in pixels

File Height

This property is of type Unsigned integer and can be referenced with the variable name FileHeight6.

Height of the bitmap file in pixels

Data Offset

This property is of type Unsigned integer and can be referenced with the variable name DataOffset6.

Offset in the file where the bitmap pixel data starts

Bitmap File

This property is of type Filename and can be referenced with the variable name bitmap_file7.

Bitmap file you wish to embed into the program.

Compatible with .bmp files in the following formats: 24-Bit / 256 Colour / 16 Colour / Monochrome

File Colour Depth

This property is of type Unsigned integer and can be referenced with the variable name ColourDepth7.

Number of bits per pixel.

Currently the component only supports bitmap files with 1-bit or 24-bit colour depth.

File Length

This property is of type Unsigned integer and can be referenced with the variable name file_Len7.

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.

File Width

This property is of type Unsigned integer and can be referenced with the variable name FileWidth7.

Width of the bitmap file in pixels

File Height

This property is of type Unsigned integer and can be referenced with the variable name FileHeight7.

Height of the bitmap file in pixels

Data Offset

This property is of type Unsigned integer and can be referenced with the variable name DataOffset7.

Offset in the file where the bitmap pixel data starts

Bitmap File

This property is of type Filename and can be referenced with the variable name bitmap_file8.

Bitmap file you wish to embed into the program.

Compatible with .bmp files in the following formats: 24-Bit / 256 Colour / 16 Colour / Monochrome

File Colour Depth

This property is of type Unsigned integer and can be referenced with the variable name ColourDepth8.

Number of bits per pixel.

Currently the component only supports bitmap files with 1-bit or 24-bit colour depth.

File Length

This property is of type Unsigned integer and can be referenced with the variable name file_Len8.

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.

File Width

This property is of type Unsigned integer and can be referenced with the variable name FileWidth8.

Width of the bitmap file in pixels

File Height

This property is of type Unsigned integer and can be referenced with the variable name FileHeight8.

Height of the bitmap file in pixels

Data Offset

This property is of type Unsigned integer and can be referenced with the variable name DataOffset8.

Offset in the file where the bitmap pixel data starts

Bitmap File

This property is of type Filename and can be referenced with the variable name bitmap_file9.

Bitmap file you wish to embed into the program.

Compatible with .bmp files in the following formats: 24-Bit / 256 Colour / 16 Colour / Monochrome

File Colour Depth

This property is of type Unsigned integer and can be referenced with the variable name ColourDepth9.

Number of bits per pixel.

Currently the component only supports bitmap files with 1-bit or 24-bit colour depth.

File Length

This property is of type Unsigned integer and can be referenced with the variable name file_Len9.

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.

File Width

This property is of type Unsigned integer and can be referenced with the variable name FileWidth9.

Width of the bitmap file in pixels

File Height

This property is of type Unsigned integer and can be referenced with the variable name FileHeight9.

Height of the bitmap file in pixels

Data Offset

This property is of type Unsigned integer and can be referenced with the variable name DataOffset9.

Offset in the file where the bitmap pixel data starts