ref man pic issue #364

This commit is contained in:
kraus 2018-10-28 14:33:34 +01:00
parent f6c48f4b1a
commit 24391f746e
2 changed files with 35 additions and 11 deletions

View File

@ -72,17 +72,7 @@
//#define U8G2_16BIT
/*
The following macro enables a special check and optimization
in the HVLine procedure for lines with one pixel length.
It enabled, it will consume about 60 bytes in flash memory of the AVR and
there will be a speed improvement of about 20% for any single pixel draw.
27 Oct 2018: The one pixel optimization is removed, it does not have any effect
*/
//#define U8G2_WITH_ONE_PIXEL_OPTIMIZATION
/* U8g2 feature selection, see also https://github.com/olikraus/u8g2/wiki/u8g2optimization */
/*
The following macro enables the HVLine speed optimization.

View File

@ -974,6 +974,40 @@ int main(void)
tga_save_png("u8g2_input_value.png");
/*=========================================*/
/* u8g2_clip_window.png */
u8x8_ClearDisplay(u8g2_GetU8x8(&desc));
u8g2_SetFontPosBaseline(&u8g2);
u8g2_SetFont(&u8g2, u8g2_font_ncenB24_tf);
u8g2_SetClipWindow(&u8g2, 10, 10, 85, 30);
u8g2_SetDrawColor(&u8g2, 1);
u8g2_FirstPage(&u8g2);
do
{
u8g2_DrawStr(&u8g2, 3, 32, "U8g2");
} while( u8g2_NextPage(&u8g2) );
tga_is_transparent = 1;
u8g2_FirstPage(&desc);
do
{
u8g2_SetFont(&desc, u8g2_font_helvB18_tf);
ra(10,10, "(10, 10)");
ra(85,30, "(85, 30)");
ra(3,32, "(3, 32)");
//vm(62,19-u8g2_GetDescent(&u8g2), -u8g2_GetDescent(&u8g2));
} while( u8g2_NextPage(&desc) );
tga_is_transparent = 0;
u8g2_SetFontPosBaseline(&u8g2);
u8g2_SetFontDirection(&u8g2, 0);
tga_save_png("u8g2_clip_window.png");
/*=========================================*/
u8x8_ClearDisplay(u8g2_GetU8x8(&desc));