2.29.10
This commit is contained in:
parent
778fac6e73
commit
ba5084f928
|
@ -256,12 +256,14 @@ https://github.com/olikraus/u8g2 ChangeLog
|
|||
* Added support for KS0713 controller (issue 1314)
|
||||
* Added support for ST7567_HEM6432 (issue 1159)
|
||||
* U8g2 16 Bit Mode enabled by default for ARM and ESP Systems (issue 1222)
|
||||
2021-xx-xx v2.29.xx olikraus@gmail.com
|
||||
2021-09-03 v2.29.11 olikraus@gmail.com
|
||||
* Update for getStrWidth/getUTF8Width: The new return value might be little bit larger (issue 1561)
|
||||
* New draw procedure drawButtonUTF8: (issue 1577)
|
||||
* Added vertical mirror option U8G2_MIRROR_VERTICAL for u8g2 (mattnutsch@gmail.com, issue 1474).
|
||||
* Added support for UC1638 based 196x96 display (issue 371)
|
||||
* Added support for HD44102 and T7932 displays (issue 1492)
|
||||
* Added support for SSD1320 (issue 1351)
|
||||
* Added support for S1D15721 (issue 1473)
|
||||
* Added support for SSD1306 EA OLEDS102 (issue 1493)
|
||||
* Added support for UC1601 128x64 (issue 1501)
|
||||
* Added support for UC1601 128x64 (issue 1501)
|
||||
* Font Wiki page splitted into four sub-pages to avoid the GitHub 'abuse' message.
|
||||
|
|
|
@ -521,6 +521,142 @@ int main(void)
|
|||
tga_save_png("u8g2_c_frame.png");
|
||||
|
||||
|
||||
/*=========================================*/
|
||||
/* u8g2_button1.png */
|
||||
|
||||
u8x8_ClearDisplay(u8g2_GetU8x8(&desc));
|
||||
u8g2_SetFont(&u8g2, u8g2_font_helvR08_tr);
|
||||
|
||||
{
|
||||
char *s = "Btn";
|
||||
u8g2_uint_t w = u8g2_GetStrWidth(&u8g2, s);
|
||||
u8g2_uint_t h = u8g2_GetAscent(&u8g2)-u8g2_GetDescent(&u8g2);
|
||||
u8g2_uint_t x = 62;
|
||||
u8g2_uint_t y = 20;
|
||||
|
||||
u8g2_SetFontPosBaseline(&u8g2);
|
||||
u8g2_FirstPage(&u8g2);
|
||||
do
|
||||
{
|
||||
u8g2_DrawButtonUTF8(&u8g2, x, y, U8G2_BTN_BW2, 0, 2, 2, s );
|
||||
} while( u8g2_NextPage(&u8g2) );
|
||||
|
||||
tga_is_transparent = 1;
|
||||
u8g2_FirstPage(&desc);
|
||||
do
|
||||
{
|
||||
u8g2_SetFont(&desc, u8g2_font_helvB18_tf);
|
||||
ra(x,y, "x=62, y=20");
|
||||
u8g2_SetFont(&u8g2, u8g2_font_ncenB18_tf);
|
||||
/* descent usually is negative */
|
||||
vm(x-1+w+2+4,y-9+h+2-1+1, h+4);
|
||||
hm(x-2, y-8+h+2+3, w+4);
|
||||
//hm(x, y-8+h+2+3, w);
|
||||
|
||||
//ra(60,40, "x=60, y=40");
|
||||
//vm(60+16+2,40+9-1, 9);
|
||||
//hm(60, 40+9+1, 16);
|
||||
|
||||
//vm(62,19-u8g2_GetDescent(&u8g2), -u8g2_GetDescent(&u8g2));
|
||||
} while( u8g2_NextPage(&desc) );
|
||||
|
||||
}
|
||||
tga_is_transparent = 0;
|
||||
u8g2_SetFontPosBaseline(&u8g2);
|
||||
|
||||
tga_save_png("u8g2_button1.png");
|
||||
|
||||
|
||||
/*=========================================*/
|
||||
/* u8g2_button2.png */
|
||||
|
||||
u8x8_ClearDisplay(u8g2_GetU8x8(&desc));
|
||||
u8g2_SetFont(&u8g2, u8g2_font_helvR08_tr);
|
||||
|
||||
{
|
||||
char *s = "Btn";
|
||||
u8g2_uint_t w = u8g2_GetStrWidth(&u8g2, s);
|
||||
u8g2_uint_t h = u8g2_GetAscent(&u8g2)-u8g2_GetDescent(&u8g2);
|
||||
u8g2_uint_t x = 62;
|
||||
u8g2_uint_t y = 20;
|
||||
|
||||
u8g2_SetFontPosBaseline(&u8g2);
|
||||
u8g2_FirstPage(&u8g2);
|
||||
do
|
||||
{
|
||||
u8g2_DrawButtonUTF8(&u8g2, x, y, U8G2_BTN_HCENTER|U8G2_BTN_BW2, 34, 2, 2, s );
|
||||
} while( u8g2_NextPage(&u8g2) );
|
||||
|
||||
tga_is_transparent = 1;
|
||||
u8g2_FirstPage(&desc);
|
||||
do
|
||||
{
|
||||
u8g2_SetFont(&desc, u8g2_font_helvB18_tf);
|
||||
ra(x,y, "x=62, y=20");
|
||||
u8g2_SetFont(&u8g2, u8g2_font_ncenB18_tf);
|
||||
/* descent usually is negative */
|
||||
vm(x-1+w+2+5,y-9+h+2-1+1, h+4);
|
||||
hm(x-19, y-8+h+2+3,34+4);
|
||||
//hm(x, y-8+h+2+3, w);
|
||||
|
||||
//ra(60,40, "x=60, y=40");
|
||||
//vm(60+16+2,40+9-1, 9);
|
||||
//hm(60, 40+9+1, 16);
|
||||
|
||||
//vm(62,19-u8g2_GetDescent(&u8g2), -u8g2_GetDescent(&u8g2));
|
||||
} while( u8g2_NextPage(&desc) );
|
||||
|
||||
}
|
||||
tga_is_transparent = 0;
|
||||
u8g2_SetFontPosBaseline(&u8g2);
|
||||
|
||||
tga_save_png("u8g2_button2.png");
|
||||
|
||||
/*=========================================*/
|
||||
/* u8g2_button3.png */
|
||||
|
||||
u8x8_ClearDisplay(u8g2_GetU8x8(&desc));
|
||||
u8g2_SetFont(&u8g2, u8g2_font_helvR08_tr);
|
||||
|
||||
{
|
||||
char *s = "Btn";
|
||||
u8g2_uint_t w = u8g2_GetStrWidth(&u8g2, s);
|
||||
u8g2_uint_t h = u8g2_GetAscent(&u8g2)-u8g2_GetDescent(&u8g2);
|
||||
u8g2_uint_t x = 62;
|
||||
u8g2_uint_t y = 20;
|
||||
|
||||
u8g2_SetFontPosBaseline(&u8g2);
|
||||
u8g2_FirstPage(&u8g2);
|
||||
do
|
||||
{
|
||||
u8g2_DrawButtonUTF8(&u8g2, x, y, U8G2_BTN_SHADOW1|U8G2_BTN_HCENTER|U8G2_BTN_BW2, 34, 2, 2, s );
|
||||
} while( u8g2_NextPage(&u8g2) );
|
||||
|
||||
tga_is_transparent = 1;
|
||||
u8g2_FirstPage(&desc);
|
||||
do
|
||||
{
|
||||
u8g2_SetFont(&desc, u8g2_font_helvB18_tf);
|
||||
ra(x,y, "x=62, y=20");
|
||||
u8g2_SetFont(&u8g2, u8g2_font_ncenB18_tf);
|
||||
/* descent usually is negative */
|
||||
vm(x-1+w+2+8,y-9+h+2-1+1, h+4);
|
||||
hm(x-19, y-8+h+2+6,34+4);
|
||||
//hm(x, y-8+h+2+3, w);
|
||||
|
||||
//ra(60,40, "x=60, y=40");
|
||||
//vm(60+16+2,40+9-1, 9);
|
||||
//hm(60, 40+9+1, 16);
|
||||
|
||||
//vm(62,19-u8g2_GetDescent(&u8g2), -u8g2_GetDescent(&u8g2));
|
||||
} while( u8g2_NextPage(&desc) );
|
||||
|
||||
}
|
||||
tga_is_transparent = 0;
|
||||
u8g2_SetFontPosBaseline(&u8g2);
|
||||
|
||||
tga_save_png("u8g2_button3.png");
|
||||
|
||||
/*=========================================*/
|
||||
/* u8g2_ellipse.png */
|
||||
|
||||
|
@ -547,7 +683,7 @@ int main(void)
|
|||
hm(20+1, 25+10+1, 15);
|
||||
hm(20-15, 25+10+1+11, 31);
|
||||
|
||||
|
||||
|
||||
//vm(62,19-u8g2_GetDescent(&u8g2), -u8g2_GetDescent(&u8g2));
|
||||
} while( u8g2_NextPage(&desc) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue