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__(
6060 stroke : int = 1 ,
6161 ) -> None :
6262 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. " )
6464
6565 self ._bitmap = displayio .Bitmap (width , height , 2 )
6666 self ._palette = displayio .Palette (2 )
Original file line number Diff line number Diff line change @@ -52,10 +52,10 @@ def __init__(
5252 outline : Optional [int ] = None ,
5353 stroke : int = 1 ,
5454 ) -> None :
55- if r > width / 2 or r > height / 2 :
56- raise ValueError ("Radius too large for given dimensions" )
5755 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)." )
5959
6060 self ._palette = displayio .Palette (3 )
6161 self ._palette .make_transparent (0 )
You can’t perform that action at this time.
0 commit comments