issue #62 solved
This commit is contained in:
parent
b0edf020e7
commit
b91e02ea42
|
@ -525,15 +525,23 @@ int8_t u8g2_font_decode_glyph(u8g2_t *u8g2, const uint8_t *glyph_data)
|
|||
break;
|
||||
case 1:
|
||||
x0 -= h;
|
||||
x0++; /* shift down, because of assymetric boundaries for the interseciton test */
|
||||
x1++;
|
||||
y1 += decode->glyph_width;
|
||||
break;
|
||||
case 2:
|
||||
x0 -= decode->glyph_width;
|
||||
x0++; /* shift down, because of assymetric boundaries for the interseciton test */
|
||||
x1++;
|
||||
y0 -= h;
|
||||
y0++; /* shift down, because of assymetric boundaries for the interseciton test */
|
||||
y1++;
|
||||
break;
|
||||
case 3:
|
||||
x1 += h;
|
||||
y0 -= decode->glyph_width;
|
||||
y0++; /* shift down, because of assymetric boundaries for the interseciton test */
|
||||
y1++;
|
||||
break;
|
||||
}
|
||||
#else /* U8G2_WITH_FONT_ROTATION */
|
||||
|
|
|
@ -225,11 +225,11 @@ void u8g2_DrawPixel(u8g2_t *u8g2, u8g2_uint_t x, u8g2_uint_t y)
|
|||
#ifdef U8G2_WITH_INTERSECTION
|
||||
if ( y < u8g2->user_y0 )
|
||||
return;
|
||||
if ( y > u8g2->user_y1 )
|
||||
if ( y >= u8g2->user_y1 )
|
||||
return;
|
||||
if ( x < u8g2->user_x0 )
|
||||
return;
|
||||
if ( x > u8g2->user_x1 )
|
||||
if ( x >= u8g2->user_x1 )
|
||||
return;
|
||||
#endif /* U8G2_WITH_INTERSECTION */
|
||||
u8g2_DrawHVLine(u8g2, x, y, 1, 0);
|
||||
|
|
|
@ -162,7 +162,7 @@ uint8_t u8g2_is_intersection_decision_tree(u8g2_uint_t a0, u8g2_uint_t a1, u8g2_
|
|||
|
||||
|
||||
|
||||
/* usually upper limits are not included, however this intersection check INCLUDES the limits */
|
||||
/* upper limits are not included (asymetric boundaries) */
|
||||
uint8_t u8g2_IsIntersection(u8g2_t *u8g2, u8g2_uint_t x0, u8g2_uint_t y0, u8g2_uint_t x1, u8g2_uint_t y1)
|
||||
{
|
||||
if ( u8g2_is_intersection_decision_tree(u8g2->user_y0, u8g2->user_y1, y0, y1) == 0 )
|
||||
|
|
|
@ -48,10 +48,14 @@ int main(void)
|
|||
{
|
||||
u8g2_SetFontPosTop(&u8g2);
|
||||
|
||||
u8g2_SetFontDirection(&u8g2, 2);
|
||||
u8g2_DrawStr(&u8g2, x, y, "270");
|
||||
|
||||
u8g2_SetFontDirection(&u8g2, 3);
|
||||
u8g2_DrawStr(&u8g2, x, y, "270");
|
||||
|
||||
u8g2_DrawPixel(&u8g2, x-3, y);
|
||||
|
||||
|
||||
|
||||
if ( i == 1 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue