Changes between Version 1 and Version 2 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/Display/CBitmap


Ignore:
Timestamp:
04/06/11 09:46:21 (14 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/Display/CBitmap

    v1 v2  
     1[[TOC]]
     2
    13= CBitmap =
     4
     5CBitmap is a C++ class that is provided to display bitmaps.
     6
     7== Constructors ==
     8
     9{{{
     10CBitmap(void);
     11CBitmap(const string& strFilename);
     12CBitmap(const char* pszfilename);
     13}}}
     14The constructors with a passed filename create a CBitmap object and load the file into memory.
     15
     16==== Parameters ====
     17 * strFilename - filename
     18 * pszFilename - filename
     19
     20==== Examples ====
     21
     22{{{
     23CBitmap image("/mnt/nand/apps/myapp/myapp.bmp");
     24}}}
     25
     26{{{
     27string strFile = "/mnt/nand/apps/myapp/myapp.bmp";
     28CBitmap image(strFile);
     29}}}
     30
     31{{{
     32CBitmap image;
     33}}}
     34This constructs the bitmap object without loading any file yet.
     35
     36== Member Functions ==
     37
     38=== LoadBitmp ===
     39Opens a specified file.
     40
     41{{{
     42int LoadBitmap(const string& strFilename);
     43int LoadBitmap(const char* pszFilename);
     44}}}
     45
     46==== Parameters ====
     47 * strFilename - filename
     48 * pszFilename - filename
     49
     50==== Return Value ====
     51
     520 successful
     53-2 file cannot be opened
     54-3 bitmap header cannot be read
     55-4 bitmap info cannot be read
     56-5 width is greater than 640, height is greater than 480, or bitmap is not 8 bits per pixel.
     57-6 color palette cannot be read
     58-7 Too many colors in palette
     59
     60==== Remarks ====
     61
     62==== Example ====
     63
     64{{{
     65CBitmap bitamp;
     66if(bitmap.LoadBitmap("/mnt/nand/apps/myapp/myapp.bmp") != 0)
     67{
     68    DisplayText(0, 0, "Error loading bitmap");
     69}
     70
     71}}}
     72
     73=== DeleteBitmap ===
     74Deletes memory in RAM allocated to the bitmap. This does not delete the file.
     75{{{
     76void DeleteBitmap(void);
     77}}}
     78
     79==== Parameters ====
     80
     81Function does not accept any parameters
     82
     83==== Retrun Value ====
     84 
     85Function does not return any result.
     86
     87==== Remarks ====
     88
     89
     90==== Example ====
     91
     92{{{
     93CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
     94bitmap.Draw(0, 0);
     95SleepSeconds(1);
     96ClearLCD();
     97bitmap.DeleteBitmap();
     98}}}
     99