Changes between Version 6 and Version 7 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/Display/CBitmap


Ignore:
Timestamp:
04/06/11 13:41:48 (14 years ago)
Author:
Don Wilson
Comment:

--

Legend:

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

    v6 v7  
    5050==== Return Value ====
    5151
    52 0 successful
    53 -2
    54 -3
    55 -4
    56 -5 .
    57 -6
    58 -7
     52||'''Response'''||'''Description'''||
     53||BITMAP_SUCCESS||Operation successful||
     54||ERR_BITMAP_FILE_OPEN||file cannot be opened||
     55||ERR_BITMAP_HEADER_READ||bitmap header cannot be read||
     56||ERR_BITMAP_INFO_READ||bitmap info cannot be read||
     57||ERR_BITMAP_SIZE_OR_TYPE||width is greater than 640, height is greater than 480, or bitmap is not 8 bits per pixel||
     58||ERR_BITMAP_PALETTE_READ||color palette cannot be read||
     59||ERR_BITMAP_TOO_MANY_COLORS||Too many colors in palette||
     60||ERR_BITMAP_BITS_READ||bitmap bits cannot be read||
     61
     62==== Remarks ====
     63
     64==== Example ====
     65
     66{{{
     67CBitmap bitamp;
     68if(bitmap.LoadBitmap("/mnt/nand/apps/myapp/myapp.bmp") != 0)
     69{
     70    DisplayText(0, 0, "Error loading bitmap");
     71}
     72
     73}}}
     74
     75=== DeleteBitmap ===
     76Deletes memory in RAM allocated to the bitmap. This does not delete the file.
     77{{{
     78void DeleteBitmap(void);
     79}}}
     80
     81==== Parameters ====
     82
     83Function does not accept any parameters
     84
     85==== Return Value ====
     86 
     87Function does not return any result.
     88
     89==== Remarks ====
     90
     91
     92==== Example ====
     93
     94{{{
     95CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
     96bitmap.Draw(0, 0);
     97SleepSeconds(1);
     98ClearLCD();
     99bitmap.DeleteBitmap();
     100}}}
     101
     102=== Draw ===
     103Draws the bitmap on the LCD display
     104{{{
     105void Draw(int x, int y);
     106}}}
     107
     108==== Parameters ====
     109
     110x - The X coordinate for the left side of the bitmap to be displayed
     111y - The Y coordinate for the top of the bitmap to be displayed
     112
     113==== Return Value ====
     114 
     115Function does not return any result.
     116
     117==== Remarks ====
     118
     119
     120==== Example ====
     121
     122{{{
     123CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
     124bitmap.Draw(0, 0);
     125}}}
     126
     127
     128=== GetWidth ===
     129Get the width of the bitmap in pixels
     130{{{
     131int GetWidth(void);
     132}}}
     133
     134==== Parameters ====
     135
     136Function does not accept any parameters.
     137
     138==== Return Value ====
     139 
     140Function returns the width of the bitmap in pixels.
     141
     142==== Remarks ====
     143
     144
     145==== Example ====
     146
     147{{{
     148CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
     149int x = bitmap.GetWidth();
     150}}}
     151
     152
     153=== GetHeight ===
     154Get the height of the bitmap in pixels
     155{{{
     156int GetHeight(void);
     157}}}
     158
     159==== Parameters ====
     160
     161Function does not accept any parameters.
     162
     163==== Return Value ====
     164 
     165Function returns the height of the bitmap in pixels.
     166
     167==== Remarks ====
     168
     169
     170==== Example ====
     171
     172{{{
     173CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
     174int y = bitmap.GetHeight();
     175}}}
     176
     177
     178=== GetColorCnt ===
     179Get the number of colors the bitmap uses
     180{{{
     181int GetColorCnt(void);
     182}}}
     183
     184==== Parameters ====
     185
     186Function does not accept any parameters.
     187
     188==== Return Value ====
     189 
     190Function returns the number of colors used by the bitmap.
     191
     192==== Remarks ====
     193
     194
     195==== Example ====
     196
     197{{{
     198CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
     199int n = bitmap.GetColorCnt();
     200}}}
     201
     202
     203=== GetColorsAdded ===
     204Get the numbers of colors added to the 825 global palette when the bitmap was loaded
     205{{{
     206int GetColorsAdded(void);
     207}}}
     208
     209==== Parameters ====
     210
     211Function does not accept any parameters.
     212
     213==== Return Value ====
     214 
     215Function returns the number of colors added to the 825 global palette when the bitmap was loaded.
     216
     217==== Remarks ====
     218
     219
     220==== Example ====
     221
     222{{{
     223CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
     224int n = bitmap.GetColorsAdded();
     225}}}
     226
     227
     228=== GetError ===
     229Get the error code
     230{{{
     231int GetError(void);
     232}}}
     233
     234==== Parameters ====
     235
     236Function does not accept any parameters.
     237
     238==== Return Value ====
     239 
     240Function returns the current error code.
    59241
    60242||'''Response'''||'''Description'''||
     
    71253==== Remarks ====
    72254
    73 ==== Example ====
    74 
    75 {{{
    76 CBitmap bitamp;
    77 if(bitmap.LoadBitmap("/mnt/nand/apps/myapp/myapp.bmp") != 0)
    78 {
    79     DisplayText(0, 0, "Error loading bitmap");
    80 }
    81 
    82 }}}
    83 
    84 === DeleteBitmap ===
    85 Deletes memory in RAM allocated to the bitmap. This does not delete the file.
    86 {{{
    87 void DeleteBitmap(void);
    88 }}}
    89 
    90 ==== Parameters ====
    91 
    92 Function does not accept any parameters
    93 
    94 ==== Return Value ====
    95  
    96 Function does not return any result.
    97 
    98 ==== Remarks ====
    99 
    100 
    101 ==== Example ====
    102 
    103 {{{
    104 CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
    105 bitmap.Draw(0, 0);
    106 SleepSeconds(1);
    107 ClearLCD();
    108 bitmap.DeleteBitmap();
    109 }}}
    110 
    111 === Draw ===
    112 Draws the bitmap on the LCD display
    113 {{{
    114 void Draw(int x, int y);
    115 }}}
    116 
    117 ==== Parameters ====
    118 
    119 x - The X coordinate for the left side of the bitmap to be displayed
    120 y - The Y coordinate for the top of the bitmap to be displayed
    121 
    122 ==== Return Value ====
    123  
    124 Function does not return any result.
    125 
    126 ==== Remarks ====
    127 
    128 
    129 ==== Example ====
    130 
    131 {{{
    132 CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
    133 bitmap.Draw(0, 0);
    134 }}}
    135 
    136 
    137 === GetWidth ===
    138 Get the width of the bitmap in pixels
    139 {{{
    140 int GetWidth(void);
    141 }}}
    142 
    143 ==== Parameters ====
    144 
    145 Function does not accept any parameters.
    146 
    147 ==== Return Value ====
    148  
    149 Function returns the width of the bitmap in pixels.
    150 
    151 ==== Remarks ====
    152 
    153 
    154 ==== Example ====
    155 
    156 {{{
    157 CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
    158 int x = bitmap.GetWidth();
    159 }}}
    160 
    161 
    162 === GetHeight ===
    163 Get the height of the bitmap in pixels
    164 {{{
    165 int GetHeight(void);
    166 }}}
    167 
    168 ==== Parameters ====
    169 
    170 Function does not accept any parameters.
    171 
    172 ==== Return Value ====
    173  
    174 Function returns the height of the bitmap in pixels.
    175 
    176 ==== Remarks ====
    177 
    178 
    179 ==== Example ====
    180 
    181 {{{
    182 CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
    183 int y = bitmap.GetHeight();
    184 }}}
    185 
    186 
    187 === GetColorCnt ===
    188 Get the number of colors the bitmap uses
    189 {{{
    190 int GetColorCnt(void);
    191 }}}
    192 
    193 ==== Parameters ====
    194 
    195 Function does not accept any parameters.
    196 
    197 ==== Return Value ====
    198  
    199 Function returns the number of colors used by the bitmap.
    200 
    201 ==== Remarks ====
    202 
    203 
    204 ==== Example ====
    205 
    206 {{{
    207 CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
    208 int n = bitmap.GetColorCnt();
    209 }}}
    210 
    211 
    212 === GetColorsAdded ===
    213 Get the numbers of colors added to the 825 global palette when the bitmap was loaded
    214 {{{
    215 int GetColorsAdded(void);
    216 }}}
    217 
    218 ==== Parameters ====
    219 
    220 Function does not accept any parameters.
    221 
    222 ==== Return Value ====
    223  
    224 Function returns the number of colors added to the 825 global palette when the bitmap was loaded.
    225 
    226 ==== Remarks ====
    227 
    228 
    229 ==== Example ====
    230 
    231 {{{
    232 CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp");
    233 int n = bitmap.GetColorsAdded();
    234 }}}
    235 
    236 
    237 === GetError ===
    238 Get the error code
    239 {{{
    240 int GetError(void);
    241 }}}
    242 
    243 ==== Parameters ====
    244 
    245 Function does not accept any parameters.
    246 
    247 ==== Return Value ====
    248  
    249 Function returns the current error code.
    250 
    251 ||'''Response'''||'''Description'''||
    252 ||BITMAP_SUCCESS||Operation successful||
    253 ||ERR_BITMAP_FILE_OPEN||file cannot be opened||
    254 ||ERR_BITMAP_HEADER_READ||bitmap header cannot be read||
    255 ||ERR_BITMAP_INFO_READ||bitmap info cannot be read||
    256 ||ERR_BITMAP_SIZE_OR_TYPE||width is greater than 640, height is greater than 480, or bitmap is not 8 bits per pixel||
    257 ||ERR_BITMAP_PALETTE_READ||color palette cannot be read||
    258 ||ERR_BITMAP_TOO_MANY_COLORS||Too many colors in palette||
    259 ||ERR_BITMAP_BITS_READ||bitmap bits cannot be read||
    260 ||ERR_BITMAP_DRAW_OFF_SCREEN||Bitmap draw would have placed bitmap off screen or partially off screen||
    261 
    262 ==== Remarks ====
    263 
    264255
    265256==== Example ====