FEHImage

back to FEHImages

Description

Library: FEHImages.h

This object is used to draw images on the LCD screen. Once you have declared a variable of type FEHImage you will have access to all of the member functions associated with the FEHImage object. Simply use the “dot” operator to access these member functions. If you wish to have multiple images at the same time, you will need to create a variable of type FEHImage.

Note: To convert your image to the .pic format, you’ll need to use the converter script documented in the open method.

The following is the picture (compressed in a zip file) used in all the examples: UnicornFEH.pic

Member Functions

void Open(const char *filename);
void Draw(int x, int y);
void Close();

Declaration

FEHImage <variable name>;

Parameters

None.

Example

#include <FEHImages.h>

int main(void)
{
    // Declares an image for a unicorn
    FEHImage unicorn;
    // Open the image
    unicorn.Open("UnicornFEH.pic");
    // Draw a unicorn in the top left corner
    unicorn.Draw(0, 0);
    // Close the image
    unicorn.Close();

    while(1) 
        LCD.Update(); //Never quit 
    return 0;
}