Skip to content

Commit a8f48d2

Browse files
committed
Update test.yml
1 parent ec5e3d4 commit a8f48d2

File tree

3 files changed

+1
-34
lines changed

3 files changed

+1
-34
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
#- windows-latest
2626
#- macOS-latest
2727
nim_version:
28-
- '1.4.0'
28+
- '1.6.12'
2929
- 'stable'
3030
needs: before
3131
steps:

examples/assets/quan.png

-1.1 KB
Loading

nico.nim

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -647,9 +647,6 @@ proc clip*(x,y,w,h: Pint) =
647647
clippingRect.w = min(w, screenWidth - x)
648648
clippingRect.h = min(h, screenHeight - y)
649649

650-
template clip*(t: (int,int,int,int)) =
651-
clip(t[0], t[1], t[2], t[3])
652-
653650
proc getClip*(): (int,int,int,int) =
654651
## returns the clipping rectangle as x,y,w,h
655652
return (clipMinX,clipMinY,clipMaxX-clipMinX,clipMaxY-clipMinY)
@@ -1073,9 +1070,6 @@ proc pgetRGB*(x,y: Pint): (uint8,uint8,uint8) =
10731070
return (0'u8,0'u8,0'u8)
10741071
return palCol(swCanvas.data[y*swCanvas.w+x].ColorId)
10751072

1076-
template rectfill*(t: (int,int,int,int)) =
1077-
rectfill(t[0], t[1], t[0]+t[2]-1, t[1]+t[3]-1)
1078-
10791073
proc rectfill*(x1,y1,x2,y2: Pint) =
10801074
## draws a filled rectangle from two points
10811075
let minx = min(x1,x2) - cameraX
@@ -1087,9 +1081,6 @@ proc rectfill*(x1,y1,x2,y2: Pint) =
10871081
for x in max(minx,clipMinX)..min(maxx,clipMaxX):
10881082
psetRaw(x,y,currentColor)
10891083

1090-
template rrectfill*(t: (int,int,int,int), r = 1) =
1091-
rrectfill(t[0], t[1], t[0]+t[2]-1, t[1]+t[3]-1, r)
1092-
10931084
proc rrectfill*(x1,y1,x2,y2: Pint, r: Pint = 1) =
10941085
## draws a filled rounded rectangle from two points, r specifies radius
10951086
let minx = min(x1,x2)
@@ -1106,36 +1097,24 @@ proc rrectfill*(x1,y1,x2,y2: Pint, r: Pint = 1) =
11061097
rectfill(minx + r, miny, maxx - r, miny + r)
11071098
rectfill(minx + r, maxy - r, maxx - r, maxy)
11081099

1109-
template box*(t: (int,int,int,int)) =
1110-
box(t[0], t[1], t[2], t[3])
1111-
11121100
proc box*(x,y,w,h: Pint) =
11131101
## draws a hollow rectangle from position and size
11141102
hline(x,y,x+w-1)
11151103
vline(x,y,y+h-1)
11161104
vline(x+w-1,y,y+h-1)
11171105
hline(x,y+h-1,x+w-1)
11181106

1119-
template boxfill*(t: (int,int,int,int)) =
1120-
boxfill(t[0], t[1], t[2], t[3])
1121-
11221107
proc boxfill*(x,y,w,h: Pint) =
11231108
## draws a filled rectangle from position and size
11241109
if w == 0 or h == 0:
11251110
return
11261111
for y in y..<y+h:
11271112
hline(x,y,x+w-1)
11281113

1129-
template rbox*(t: (int,int,int,int), r = 1) =
1130-
rbox(t[0], t[1], t[2], t[3], r)
1131-
11321114
proc rbox*(x,y,w,h: Pint, r: Pint = 1) =
11331115
## draws a hollow rounded rectangle from position and size, r specifies radius
11341116
rrect(x,y,x+w-1,y+h-1,r)
11351117

1136-
template rboxfill*(t: (int,int,int,int), r = 1) =
1137-
rboxfill(t[0], t[1], t[2], t[3], r)
1138-
11391118
proc rboxfill*(x,y,w,h: Pint, r: Pint = 1) =
11401119
## draws a filled rounded rectangle from position and size, r specifies radius
11411120
rrectfill(x,y,x+w-1,y+h-1,r)
@@ -1276,9 +1255,6 @@ proc lineDashed*(x0,y0,x1,y1: Pint, pattern: uint8 = 0b10101010) =
12761255
if (pattern and (1 shl i).uint8) != 0:
12771256
pset(x,y)
12781257

1279-
template rect*(t: (int,int,int,int)) =
1280-
rect(t[0], t[1], t[0]+t[2]-1, t[1]+t[3]-1)
1281-
12821258
proc rect*(x1,y1,x2,y2: Pint) =
12831259
## draws a rectangle defined by two points
12841260
let w = x2-x1
@@ -1294,9 +1270,6 @@ proc rect*(x1,y1,x2,y2: Pint) =
12941270
# left
12951271
vline(x, y+1, y+h-1)
12961272

1297-
template rrect*(t: (int,int,int,int), r = 1) =
1298-
rrect(t[0], t[1], t[0]+t[2]-1, t[1]+t[3]-1, r)
1299-
13001273
proc rrect*(x1,y1,x2,y2: Pint, r: Pint = 1) =
13011274
## draws a rounded rectangle, radius defined by r
13021275

@@ -1379,9 +1352,6 @@ proc rrect*(x1,y1,x2,y2: Pint, r: Pint = 1) =
13791352
vline(minx, miny + r, maxy - r)
13801353
vline(maxx, miny + r, maxy - r)
13811354

1382-
template rectCorner*(t: (int,int,int,int)) =
1383-
rectCorner(t[0], t[1], t[0]+t[2]-1, t[1]+t[3]-1)
1384-
13851355
proc rectCorner*(x1,y1,x2,y2: Pint) =
13861356
## draws the corners of a rectangle
13871357
let x = x1
@@ -1403,9 +1373,6 @@ proc rectCorner*(x1,y1,x2,y2: Pint) =
14031373
pset(x2-1, y2)
14041374
pset(x2, y2-1)
14051375

1406-
template rrectCorner*(t: (int,int,int,int)) =
1407-
rrectCorner(t[0], t[1], t[0]+t[2]-1, t[1]+t[3]-1)
1408-
14091376
proc rrectCorner*(x1,y1,x2,y2: Pint) =
14101377
## draws the corners of a rounded rectangle
14111378
let x = x1

0 commit comments

Comments
 (0)