Whitespace cleanup on fb_viewport Rewrite

Change-Id: I24aac41c8abecf7b78a44d7f59e842b791be4563
This commit is contained in:
William Wilgus 2020-10-26 12:38:22 -04:00
parent 3237ae4a4f
commit 40e98a2e49
26 changed files with 348 additions and 348 deletions

View file

@ -74,11 +74,11 @@ void lcd_hline(int x1, int x2, int y)
/******************** In viewport clipping **********************/
/* nothing to draw? */
if (((unsigned)y >= (unsigned)lcd_current_viewport->height) ||
if (((unsigned)y >= (unsigned)lcd_current_viewport->height) ||
(x1 >= lcd_current_viewport->width) ||
(x2 < 0))
return;
if (x1 < 0)
x1 = 0;
if (x2 >= lcd_current_viewport->width)
@ -88,14 +88,14 @@ void lcd_hline(int x1, int x2, int y)
x1 += lcd_current_viewport->x;
x2 += lcd_current_viewport->x;
y += lcd_current_viewport->y;
#if defined(HAVE_VIEWPORT_CLIP)
/********************* Viewport on screen clipping ********************/
/* nothing to draw? */
if (((unsigned)y >= (unsigned) LCD_HEIGHT) || (x1 >= LCD_WIDTH)
|| (x2 < 0))
return;
return;
/* clipping */
if (x1 < 0)
x1 = 0;
@ -179,19 +179,19 @@ void lcd_vline(int x, int y1, int y2)
y1 = 0;
if (y2 >= lcd_current_viewport->height)
y2 = lcd_current_viewport->height-1;
/* adjust for viewport */
x += lcd_current_viewport->x;
y1 += lcd_current_viewport->y;
y2 += lcd_current_viewport->y;
#if defined(HAVE_VIEWPORT_CLIP)
/********************* Viewport on screen clipping ********************/
/* nothing to draw? */
if (( (unsigned) x >= (unsigned)LCD_WIDTH) || (y1 >= LCD_HEIGHT)
if (( (unsigned) x >= (unsigned)LCD_WIDTH) || (y1 >= LCD_HEIGHT)
|| (y2 < 0))
return;
/* clipping */
if (y1 < 0)
y1 = 0;
@ -224,7 +224,7 @@ void ICODE_ATTR lcd_bitmap_part(const fb_data *src, int src_x, int src_y,
if ((width <= 0) || (height <= 0) || (x >= lcd_current_viewport->width) ||
(y >= lcd_current_viewport->height) || (x + width <= 0) || (y + height <= 0))
return;
if (x < 0)
{
width += x;
@ -237,23 +237,23 @@ void ICODE_ATTR lcd_bitmap_part(const fb_data *src, int src_x, int src_y,
src_y -= y;
y = 0;
}
if (x + width > lcd_current_viewport->width)
width = lcd_current_viewport->width - x;
if (y + height > lcd_current_viewport->height)
height = lcd_current_viewport->height - y;
height = lcd_current_viewport->height - y;
/* adjust for viewport */
x += lcd_current_viewport->x;
y += lcd_current_viewport->y;
#if defined(HAVE_VIEWPORT_CLIP)
/********************* Viewport on screen clipping ********************/
/* nothing to draw? */
if ((x >= LCD_WIDTH) || (y >= LCD_HEIGHT)
if ((x >= LCD_WIDTH) || (y >= LCD_HEIGHT)
|| (x + width <= 0) || (y + height <= 0))
return;
/* clip image in viewport in screen */
if (x < 0)
{
@ -272,7 +272,7 @@ void ICODE_ATTR lcd_bitmap_part(const fb_data *src, int src_x, int src_y,
if (y + height > LCD_HEIGHT)
height = LCD_HEIGHT - y;
#endif
src += stride * src_y + src_x; /* move starting point */
dst = FBADDR(x, y);
stride_dst = lcd_current_viewport->buffer->stride;
@ -300,7 +300,7 @@ void ICODE_ATTR lcd_bitmap_transparent_part(const fb_data *src, int src_x,
if ((width <= 0) || (height <= 0) || (x >= lcd_current_viewport->width) ||
(y >= lcd_current_viewport->height) || (x + width <= 0) || (y + height <= 0))
return;
if (x < 0)
{
width += x;
@ -313,23 +313,23 @@ void ICODE_ATTR lcd_bitmap_transparent_part(const fb_data *src, int src_x,
src_y -= y;
y = 0;
}
if (x + width > lcd_current_viewport->width)
width = lcd_current_viewport->width - x;
if (y + height > lcd_current_viewport->height)
height = lcd_current_viewport->height - y;
height = lcd_current_viewport->height - y;
/* adjust for viewport */
x += lcd_current_viewport->x;
y += lcd_current_viewport->y;
#if defined(HAVE_VIEWPORT_CLIP)
/********************* Viewport on screen clipping ********************/
/* nothing to draw? */
if ((x >= LCD_WIDTH) || (y >= LCD_HEIGHT)
if ((x >= LCD_WIDTH) || (y >= LCD_HEIGHT)
|| (x + width <= 0) || (y + height <= 0))
return;
/* clip image in viewport in screen */
if (x < 0)
{