lib/unigraphic/GraphicsDisplay.h

changeset 66
48f29a1d43d6
parent 45
2da50a3d4e9f
equal deleted inserted replaced
65:d9c5eaf85fab 66:48f29a1d43d6
40 #define GreenYellow 0xAFE5 /* 173, 255, 47 */ 40 #define GreenYellow 0xAFE5 /* 173, 255, 47 */
41 41
42 /** Bitmap 42 /** Bitmap
43 */ 43 */
44 struct Bitmap_s{ 44 struct Bitmap_s{
45 int xSize; 45 unsigned int xSize;
46 int ySize; 46 unsigned int ySize;
47 int Byte_in_Line; 47 unsigned int Byte_in_Line;
48 char* data; 48 char* data;
49 }; 49 };
50 50
51 /** A common base class for Graphics displays 51 /** A common base class for Graphics displays
52 */ 52 */
241 * 241 *
242 * define the array as static const unsigned char to put it into flash memory 242 * define the array as static const unsigned char to put it into flash memory
243 * cast the pointer to (unsigned char *) : 243 * cast the pointer to (unsigned char *) :
244 * tft.Bitmap(10,40,309,50,(unsigned char *)scala); 244 * tft.Bitmap(10,40,309,50,(unsigned char *)scala);
245 */ 245 */
246 void Bitmap(int x, int y, int w, int h,unsigned char *bitmap); 246 void Bitmap(unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned char *bitmap);
247 247
248 /** paint monochrome bitmap to screen 248 /** paint monochrome bitmap to screen
249 * 249 *
250 * @param bm Bitmap in flash 250 * @param bm Bitmap in flash
251 * @param x x start 251 * @param x x start
347 bool get_auto_up(void); 347 bool get_auto_up(void);
348 348
349 349
350 350
351 private: 351 private:
352
353 unsigned char* font; 352 unsigned char* font;
354 // display width and height related to current orientation 353 // display width and height related to current orientation
355 int oriented_width; 354 unsigned int oriented_width;
356 int oriented_height; 355 unsigned int oriented_height;
357 356
358 // text char location 357 // text char location
359 int char_x; 358 unsigned int char_x;
360 int char_y; 359 unsigned int char_y;
361 360
362 int fontoffset;// bytes / char (short) 361 unsigned int fontoffset;// bytes / char (short)
363 int fonthor; // hor size of font (char) 362 unsigned int fonthor; // hor size of font (char)
364 int fontvert; // ver size of font (char) 363 unsigned int fontvert; // ver size of font (char)
365 int fontbpl; // bytes per line (char) 364 unsigned int fontbpl; // bytes per line (char)
366 int fontzoomver; // size multiplier 365 unsigned int fontzoomver; // size multiplier
367 int fontzoomhor; // size multiplier 366 unsigned int fontzoomhor; // size multiplier
368 unsigned char firstch; // first ascii code present in font array (usually 32) 367 unsigned char firstch; // first ascii code present in font array (usually 32)
369 unsigned char lastch; // last ascii code present in font array (usually 127) 368 unsigned char lastch; // last ascii code present in font array (usually 127)
370 bool auto_up; // autoupdate flag for LCD 369 bool auto_up; // autoupdate flag for LCD
371 bool fontprop; 370 bool fontprop;
372 371

mercurial