summaryrefslogtreecommitdiffstats
path: root/firmware/drivers/lcd-16bit-vert.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-10-26 12:38:22 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2020-10-26 12:38:22 -0400
commit40e98a2e4915464b9306ab7b0f6feb173de095c5 (patch)
tree4e987640ae4ad201f029c4e26e51ebc61a4549b1 /firmware/drivers/lcd-16bit-vert.c
parent3237ae4a4ff9296a377ff9194a11038da161208f (diff)
downloadrockbox-40e98a2e4915464b9306ab7b0f6feb173de095c5.tar.gz
rockbox-40e98a2e4915464b9306ab7b0f6feb173de095c5.tar.bz2
rockbox-40e98a2e4915464b9306ab7b0f6feb173de095c5.zip
Whitespace cleanup on fb_viewport Rewrite
Change-Id: I24aac41c8abecf7b78a44d7f59e842b791be4563
Diffstat (limited to 'firmware/drivers/lcd-16bit-vert.c')
-rw-r--r--firmware/drivers/lcd-16bit-vert.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/firmware/drivers/lcd-16bit-vert.c b/firmware/drivers/lcd-16bit-vert.c
index b336e78c78..8631271482 100644
--- a/firmware/drivers/lcd-16bit-vert.c
+++ b/firmware/drivers/lcd-16bit-vert.c
@@ -84,19 +84,19 @@ void lcd_hline(int x1, int x2, int y)
x1 = 0;
if (x2 >= lcd_current_viewport->width)
x2 = lcd_current_viewport->width-1;
-
+
/* Adjust x1 and y to viewport */
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;
@@ -143,19 +143,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)
{
@@ -294,13 +294,13 @@ void ICODE_ATTR lcd_bitmap_transparent_part(const fb_data *src, int src_x,
{
fb_data *dst, *dst_end;
int stride_dst;
-
+
/******************** Image in viewport clipping **********************/
/* nothing to draw? */
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)
{