intersection: updates
This commit is contained in:
parent
516b8efc56
commit
a18b214969
|
@ -259,9 +259,9 @@ struct u8g2_struct
|
|||
/* use u8g2_IsIntersection from u8g2_intersection.c to test against this intersection */
|
||||
/* boundary values are part of the box so that they can be used with u8g2_IsIntersection */
|
||||
u8g2_uint_t user_x0; /* left corner of the buffer */
|
||||
u8g2_uint_t user_x1; /* right corner of the buffer (included) */
|
||||
u8g2_uint_t user_x1; /* right corner of the buffer (excluded) */
|
||||
u8g2_uint_t user_y0; /* upper edge of the buffer */
|
||||
u8g2_uint_t user_y1; /* lower edge of the buffer (included) */
|
||||
u8g2_uint_t user_y1; /* lower edge of the buffer (excluded) */
|
||||
|
||||
/* information about the current font */
|
||||
const uint8_t *font; /* current font for all text procedures */
|
||||
|
|
|
@ -223,11 +223,11 @@ void u8g2_DrawPixel(u8g2_t *u8g2, u8g2_uint_t x, u8g2_uint_t y)
|
|||
#ifdef U8G2_WITH_INTERSECTION
|
||||
if ( x < u8g2->user_x0 )
|
||||
return;
|
||||
if ( x > u8g2->user_x1 )
|
||||
if ( x >= u8g2->user_x1 )
|
||||
return;
|
||||
if ( y < u8g2->user_y0 )
|
||||
return;
|
||||
if ( y > u8g2->user_y1 )
|
||||
if ( y >= u8g2->user_y1 )
|
||||
return;
|
||||
#endif /* U8G2_WITH_INTERSECTION */
|
||||
u8g2_DrawHVLine(u8g2, x, y, 1, 0);
|
||||
|
|
|
@ -63,7 +63,7 @@ void u8g2_SetupBuffer(u8g2_t *u8g2, uint8_t *buf, uint8_t tile_buf_height, u8g2_
|
|||
update dimension:
|
||||
calculate the following variables:
|
||||
u8g2_uint_t buf_x0; left corner of the buffer
|
||||
u8g2_uint_t buf_x1; right corner of the buffer (included)
|
||||
u8g2_uint_t buf_x1; right corner of the buffer (excluded)
|
||||
u8g2_uint_t buf_y0;
|
||||
u8g2_uint_t buf_y1;
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue