Skip to content

Commit b97ba9f

Browse files
committed
Release 9.1.0
Added check on vector coordinates
1 parent c63e51d commit b97ba9f

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=PDLS_Basic
2-
version=9.0.8
2+
version=9.1.0
33
author=Rei Vilo
44
maintainer=Rei Vilo
55
sentence=Library for Pervasive Displays iTC screens, extension boards and development kits

src/hV_Screen_Buffer.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// Release 703: Improved orientation function
2222
// Release 801: Improved functions names consistency
2323
// Release 805: Added large variant for gText()
24+
// Release 910: Added check on vector coordinates
2425
//
2526

2627
// Library header
@@ -208,6 +209,11 @@ void hV_Screen_Buffer::circle(uint16_t x0, uint16_t y0, uint16_t radius, uint16_
208209

209210
void hV_Screen_Buffer::dLine(uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t colour)
210211
{
212+
if ((dx == 0) or (dy == 0))
213+
{
214+
return;
215+
}
216+
211217
line(x0, y0, x0 + dx - 1, y0 + dy - 1, colour);
212218
}
213219

@@ -335,6 +341,11 @@ void hV_Screen_Buffer::rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t
335341

336342
void hV_Screen_Buffer::dRectangle(uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t colour)
337343
{
344+
if ((dx == 0) or (dy == 0))
345+
{
346+
return;
347+
}
348+
338349
rectangle(x0, y0, x0 + dx - 1, y0 + dy - 1, colour);
339350
}
340351

src/hV_Screen_Buffer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/// @n Based on highView technology
77
///
88
/// @author Rei Vilo
9-
/// @date 21 Jan 2025
10-
/// @version 902
9+
/// @date 21 Jun 2025
10+
/// @version 910
1111
///
1212
/// @copyright (c) Rei Vilo, 2010-2025
1313
/// @copyright All rights reserved
@@ -43,7 +43,7 @@
4343
///
4444
/// @brief Library release number
4545
///
46-
#define hV_SCREEN_BUFFER_RELEASE 902
46+
#define hV_SCREEN_BUFFER_RELEASE 910
4747

4848
// Colours
4949
#include "hV_Colours565.h"

0 commit comments

Comments
 (0)