issue #364, clip procedure pos len conversion (4)

This commit is contained in:
kraus 2018-10-27 21:13:40 +02:00
parent 969c60d631
commit b6d9e4329a
1 changed files with 9 additions and 11 deletions

View File

@ -46,16 +46,15 @@
#include <assert.h>
/*
Description:
clip range from pos a (included) with line len (a+len excluded) agains c (included) to d (excluded)
Assumptions:
len > 0
c <= d (this is not checked)
will return 0 if there is no intersection and if a > b
/*
Description:
clip range from pos a (included) with line len (a+len excluded) agains c (included) to d (excluded)
Assumptions:
len > 0
c <= d (this is not checked)
will return 0 if there is no intersection and if a > b
*/
*/
static uint8_t u8g2_clip_intersection2(u8g2_uint_t *ap, u8g2_uint_t *len, u8g2_uint_t c, u8g2_uint_t d)
{
@ -150,8 +149,7 @@ void u8g2_DrawHVLine(u8g2_t *u8g2, u8g2_uint_t x, u8g2_uint_t y, u8g2_uint_t len
if ( len != 0 )
{
/* convert to two directions */
/* convert to two directions */
if ( len > 1 )
{
if ( dir == 2 )