File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ def __init__(
60
60
stroke : int = 1 ,
61
61
) -> None :
62
62
if width <= 0 or height <= 0 :
63
- raise ValueError ("Width and height must be greater than 0" )
63
+ raise ValueError ("Rectangle dimensions must be larger than 0. " )
64
64
65
65
self ._bitmap = displayio .Bitmap (width , height , 2 )
66
66
self ._palette = displayio .Palette (2 )
Original file line number Diff line number Diff line change @@ -52,10 +52,10 @@ def __init__(
52
52
outline : Optional [int ] = None ,
53
53
stroke : int = 1 ,
54
54
) -> None :
55
- if r > width / 2 or r > height / 2 :
56
- raise ValueError ("Radius too large for given dimensions" )
57
55
if width <= 0 or height <= 0 :
58
- raise ValueError ("Width and height must be greater than 0" )
56
+ raise ValueError ("Rectangle dimensions must be larger than 0." )
57
+ if r > width / 2 or r > height / 2 :
58
+ raise ValueError ("Radius cannot exceed half of the smaller side (width or height)." )
59
59
60
60
self ._palette = displayio .Palette (3 )
61
61
self ._palette .make_transparent (0 )
You can’t perform that action at this time.
0 commit comments