reference manual pictures for #771
This commit is contained in:
parent
9b8f43dec9
commit
2cce986bfd
|
@ -209,5 +209,5 @@ https://github.com/olikraus/u8g2 ChangeLog
|
|||
* Improved speed for I2C with SSD1306 controller: 4% faster now (issue 735)
|
||||
* Fixed code problems (issues 766 and 754)
|
||||
* Added battery and emoticons (issue 747)
|
||||
* New U8x8 font format, added larger fonts (issue 771)
|
||||
* New U8x8 font format, added large U8x8 fonts (issue 771)
|
||||
|
||||
|
|
|
@ -347,9 +347,6 @@ uint8_t u8x8_d_tga_lcd(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr
|
|||
tga_fg_g = tga_lcd_fg_g;
|
||||
tga_fg_b = tga_lcd_fg_b;
|
||||
|
||||
tga_bg_r = tga_lcd_bg_r;
|
||||
tga_bg_g = tga_lcd_bg_g;
|
||||
tga_bg_b = tga_lcd_bg_b;
|
||||
|
||||
x = ((u8x8_tile_t *)arg_ptr)->x_pos;
|
||||
//printf("U8X8_MSG_DISPLAY_DRAW_TILE x=%d, ", x);
|
||||
|
@ -366,6 +363,20 @@ uint8_t u8x8_d_tga_lcd(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr
|
|||
|
||||
do
|
||||
{
|
||||
|
||||
if ( (x/8+y/8) & 1 )
|
||||
{
|
||||
tga_bg_r = tga_lcd_bg_r;
|
||||
tga_bg_g = tga_lcd_bg_g;
|
||||
tga_bg_b = tga_lcd_bg_b;
|
||||
}
|
||||
else
|
||||
{
|
||||
tga_bg_r = (tga_lcd_bg_r*10)/11;
|
||||
tga_bg_g = (tga_lcd_bg_g*10)/11;
|
||||
tga_bg_b = (tga_lcd_bg_b*10)/11;
|
||||
}
|
||||
|
||||
c = ((u8x8_tile_t *)arg_ptr)->cnt;
|
||||
ptr = ((u8x8_tile_t *)arg_ptr)->tile_ptr;
|
||||
tga_set_multiple_8pixel(x, y, c*8, ptr, FACTOR);
|
||||
|
|
|
@ -209,6 +209,8 @@ int main(void)
|
|||
|
||||
tga_save_png("u8x8_2x2.png");
|
||||
|
||||
/*=========================================*/
|
||||
|
||||
u8x8_ClearDisplay(u8g2_GetU8x8(&desc));
|
||||
u8x8_ClearDisplay(&u8x8);
|
||||
u8x8_SetPowerSave(&u8x8, 0);
|
||||
|
@ -230,6 +232,31 @@ int main(void)
|
|||
|
||||
tga_save_png("u8x8_1x2.png");
|
||||
|
||||
/*=========================================*/
|
||||
|
||||
u8x8_ClearDisplay(u8g2_GetU8x8(&desc));
|
||||
u8x8_ClearDisplay(&u8x8);
|
||||
u8x8_SetPowerSave(&u8x8, 0);
|
||||
u8x8_SetInverseFont(&u8x8, 0);
|
||||
//u8x8_SetFont(&u8x8, u8x8_font_pressstart2p_f);
|
||||
u8x8_SetFont(&u8x8, u8x8_font_amstrad_cpc_extended_r);
|
||||
u8x8_Draw2x2String(&u8x8, 1, 1, "U8x8");
|
||||
u8x8_SetFont(&u8x8, u8x8_font_px437wyse700b_2x2_r);
|
||||
u8x8_DrawString(&u8x8, 1, 3, "U8x8");
|
||||
|
||||
tga_is_transparent = 1;
|
||||
u8g2_FirstPage(&desc);
|
||||
do
|
||||
{
|
||||
u8g2_SetFont(&desc, u8g2_font_helvB18_tf);
|
||||
ra(1,1, "x=1, y=1");
|
||||
ra(1,3, "x=1, y=3");
|
||||
} while( u8g2_NextPage(&desc) );
|
||||
tga_is_transparent = 0;
|
||||
|
||||
tga_save_png("u8x8_font_2x2.png");
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue