BIOS Reference - PICTURE Functions

From NanoComputerWiki

Jump to: navigation, search

PICTURE Module Functions

NanoComputer BIOS Reference

PICTURE Module

Note: This information may be out of date. For the latest information always check the header files shipped with the NanoComputer SDK.

Last update: Oct 31 2008

// --------------------------------------------------
//  Structures & Typedefs
// --------------------------------------------------
    struct _PICTURE_Header {
        unsigned short Version;
        unsigned short DataOffset;
        unsigned short Height;
        unsigned short Width;
    };
    typedef struct _PICTURE_Header PICTURE_Header;

    struct _PICTURE_Info {
        char Filename[NCFS_FILENAME_MAXCHARS];
        struct _PICTURE_Header Header;
    };
    typedef struct _PICTURE_Info PICTURE_Info;


// --------------------------------------------------
//  Function Prototypes
// --------------------------------------------------
    /**
     * Draws a picture file on the LCD
     *
     *  sFilename - [in] Name of the picture file, usually ends in an .pic extension (string)
     *  X         - [in] X coordinate on the LCD to draw the picture 
     *  Y         - [in] Y coordinate on the LCD to draw the picture
     *
     *  Returns E_OK on success, other error on failure
     **/
    char PICTURE_Draw(char* sFilename, unsigned short X, unsigned short Y);

    /**
     * Draws a picture file on the LCD using a PICTURE_Info structure and an external cache buffer
     *
     *  pInfo   - [in] PICTURE_Info structure holding information about the picture (see PICTURE_GetInfo)
     *  X       - [in] X coordinate on the LCD to draw the picture 
     *  Y       - [in] Y coordinate on the LCD to draw the picture
     *  pBuf    - [in] Buffer which is used by this function to cache data.
     *  BufSize - [in] Size of the pBuf buffer
     *
     *  The picture drawing performance is dependent on the size of the pBuf.  The pBuf is used in chunks of 
     *  2 * width bytes.
     *
     *  Returns E_OK on success, other error on failure
     **/
    char PICTURE_DrawEx(PICTURE_Info* pInfo, unsigned short X, unsigned short Y, void* pBuf, unsigned short BufSize);

    /**
     * Retrieves information about a picture
     *
     *  sFilename - [in] Name of the picture file, usually ends in an .pic extension (string)
     *  pInfo   - [in] PICTURE_Info structure holding information about the picture 
     *
     *  Returns E_OK on success, other error on failure
     **/
    char PICTURE_GetInfo(char* sFilename, PICTURE_Info* pInfo);

Navigation

Click on any of the links below to navigate to a new page