| 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 | {{{ |
| | 67 | CBitmap bitamp; |
| | 68 | if(bitmap.LoadBitmap("/mnt/nand/apps/myapp/myapp.bmp") != 0) |
| | 69 | { |
| | 70 | DisplayText(0, 0, "Error loading bitmap"); |
| | 71 | } |
| | 72 | |
| | 73 | }}} |
| | 74 | |
| | 75 | === DeleteBitmap === |
| | 76 | Deletes memory in RAM allocated to the bitmap. This does not delete the file. |
| | 77 | {{{ |
| | 78 | void DeleteBitmap(void); |
| | 79 | }}} |
| | 80 | |
| | 81 | ==== Parameters ==== |
| | 82 | |
| | 83 | Function does not accept any parameters |
| | 84 | |
| | 85 | ==== Return Value ==== |
| | 86 | |
| | 87 | Function does not return any result. |
| | 88 | |
| | 89 | ==== Remarks ==== |
| | 90 | |
| | 91 | |
| | 92 | ==== Example ==== |
| | 93 | |
| | 94 | {{{ |
| | 95 | CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp"); |
| | 96 | bitmap.Draw(0, 0); |
| | 97 | SleepSeconds(1); |
| | 98 | ClearLCD(); |
| | 99 | bitmap.DeleteBitmap(); |
| | 100 | }}} |
| | 101 | |
| | 102 | === Draw === |
| | 103 | Draws the bitmap on the LCD display |
| | 104 | {{{ |
| | 105 | void Draw(int x, int y); |
| | 106 | }}} |
| | 107 | |
| | 108 | ==== Parameters ==== |
| | 109 | |
| | 110 | x - The X coordinate for the left side of the bitmap to be displayed |
| | 111 | y - The Y coordinate for the top of the bitmap to be displayed |
| | 112 | |
| | 113 | ==== Return Value ==== |
| | 114 | |
| | 115 | Function does not return any result. |
| | 116 | |
| | 117 | ==== Remarks ==== |
| | 118 | |
| | 119 | |
| | 120 | ==== Example ==== |
| | 121 | |
| | 122 | {{{ |
| | 123 | CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp"); |
| | 124 | bitmap.Draw(0, 0); |
| | 125 | }}} |
| | 126 | |
| | 127 | |
| | 128 | === GetWidth === |
| | 129 | Get the width of the bitmap in pixels |
| | 130 | {{{ |
| | 131 | int GetWidth(void); |
| | 132 | }}} |
| | 133 | |
| | 134 | ==== Parameters ==== |
| | 135 | |
| | 136 | Function does not accept any parameters. |
| | 137 | |
| | 138 | ==== Return Value ==== |
| | 139 | |
| | 140 | Function returns the width of the bitmap in pixels. |
| | 141 | |
| | 142 | ==== Remarks ==== |
| | 143 | |
| | 144 | |
| | 145 | ==== Example ==== |
| | 146 | |
| | 147 | {{{ |
| | 148 | CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp"); |
| | 149 | int x = bitmap.GetWidth(); |
| | 150 | }}} |
| | 151 | |
| | 152 | |
| | 153 | === GetHeight === |
| | 154 | Get the height of the bitmap in pixels |
| | 155 | {{{ |
| | 156 | int GetHeight(void); |
| | 157 | }}} |
| | 158 | |
| | 159 | ==== Parameters ==== |
| | 160 | |
| | 161 | Function does not accept any parameters. |
| | 162 | |
| | 163 | ==== Return Value ==== |
| | 164 | |
| | 165 | Function returns the height of the bitmap in pixels. |
| | 166 | |
| | 167 | ==== Remarks ==== |
| | 168 | |
| | 169 | |
| | 170 | ==== Example ==== |
| | 171 | |
| | 172 | {{{ |
| | 173 | CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp"); |
| | 174 | int y = bitmap.GetHeight(); |
| | 175 | }}} |
| | 176 | |
| | 177 | |
| | 178 | === GetColorCnt === |
| | 179 | Get the number of colors the bitmap uses |
| | 180 | {{{ |
| | 181 | int GetColorCnt(void); |
| | 182 | }}} |
| | 183 | |
| | 184 | ==== Parameters ==== |
| | 185 | |
| | 186 | Function does not accept any parameters. |
| | 187 | |
| | 188 | ==== Return Value ==== |
| | 189 | |
| | 190 | Function returns the number of colors used by the bitmap. |
| | 191 | |
| | 192 | ==== Remarks ==== |
| | 193 | |
| | 194 | |
| | 195 | ==== Example ==== |
| | 196 | |
| | 197 | {{{ |
| | 198 | CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp"); |
| | 199 | int n = bitmap.GetColorCnt(); |
| | 200 | }}} |
| | 201 | |
| | 202 | |
| | 203 | === GetColorsAdded === |
| | 204 | Get the numbers of colors added to the 825 global palette when the bitmap was loaded |
| | 205 | {{{ |
| | 206 | int GetColorsAdded(void); |
| | 207 | }}} |
| | 208 | |
| | 209 | ==== Parameters ==== |
| | 210 | |
| | 211 | Function does not accept any parameters. |
| | 212 | |
| | 213 | ==== Return Value ==== |
| | 214 | |
| | 215 | Function 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 | {{{ |
| | 223 | CBitmap bitmap("/mnt/nand/apps/myapp/myapp.bmp"); |
| | 224 | int n = bitmap.GetColorsAdded(); |
| | 225 | }}} |
| | 226 | |
| | 227 | |
| | 228 | === GetError === |
| | 229 | Get the error code |
| | 230 | {{{ |
| | 231 | int GetError(void); |
| | 232 | }}} |
| | 233 | |
| | 234 | ==== Parameters ==== |
| | 235 | |
| | 236 | Function does not accept any parameters. |
| | 237 | |
| | 238 | ==== Return Value ==== |
| | 239 | |
| | 240 | Function returns the current error code. |
| 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 | | |