@@ -16,10 +16,10 @@ var (
16
16
blocks = []blockFunc {b0 , b1 , b2 , b3 , b4 , b5 , b6 , b7 , b8 , b9 , b10 , b11 , b12 , b13 , b14 , b15 , b16 , b17 , b18 , b19 , b20 , b21 , b22 , b23 , b24 , b25 , b26 , b27 }
17
17
)
18
18
19
- type blockFunc func (img * image.Paletted , x , y , size int , angle int )
19
+ type blockFunc func (img * image.Paletted , x , y , size , angle int )
20
20
21
21
// draw a polygon by points, and the polygon is rotated by angle.
22
- func drawBlock (img * image.Paletted , x , y , size int , angle int , points []int ) {
22
+ func drawBlock (img * image.Paletted , x , y , size , angle int , points []int ) {
23
23
if angle != 0 {
24
24
m := size / 2
25
25
rotate (points , m , m , angle )
@@ -41,7 +41,7 @@ func drawBlock(img *image.Paletted, x, y, size int, angle int, points []int) {
41
41
// | |
42
42
// | |
43
43
// --------
44
- func b0 (img * image.Paletted , x , y , size int , angle int ) {}
44
+ func b0 (img * image.Paletted , x , y , size , angle int ) {}
45
45
46
46
// full-filled
47
47
//
@@ -50,7 +50,7 @@ func b0(img *image.Paletted, x, y, size int, angle int) {}
50
50
// |######|
51
51
// |######|
52
52
// --------
53
- func b1 (img * image.Paletted , x , y , size int , angle int ) {
53
+ func b1 (img * image.Paletted , x , y , size , angle int ) {
54
54
for i := x ; i < x + size ; i ++ {
55
55
for j := y ; j < y + size ; j ++ {
56
56
img .SetColorIndex (i , j , 1 )
@@ -65,7 +65,7 @@ func b1(img *image.Paletted, x, y, size int, angle int) {
65
65
// | #### |
66
66
// | |
67
67
// ----------
68
- func b2 (img * image.Paletted , x , y , size int , angle int ) {
68
+ func b2 (img * image.Paletted , x , y , size , angle int ) {
69
69
l := size / 4
70
70
x += l
71
71
y += l
@@ -88,7 +88,7 @@ func b2(img *image.Paletted, x, y, size int, angle int) {
88
88
// | ### |
89
89
// | # |
90
90
// ---------
91
- func b3 (img * image.Paletted , x , y , size int , angle int ) {
91
+ func b3 (img * image.Paletted , x , y , size , angle int ) {
92
92
m := size / 2
93
93
drawBlock (img , x , y , size , 0 , []int {
94
94
m , 0 ,
@@ -108,7 +108,7 @@ func b3(img *image.Paletted, x, y, size int, angle int) {
108
108
// |## |
109
109
// |# |
110
110
// |------
111
- func b4 (img * image.Paletted , x , y , size int , angle int ) {
111
+ func b4 (img * image.Paletted , x , y , size , angle int ) {
112
112
drawBlock (img , x , y , size , angle , []int {
113
113
0 , 0 ,
114
114
size , 0 ,
@@ -124,7 +124,7 @@ func b4(img *image.Paletted, x, y, size int, angle int) {
124
124
// | ### |
125
125
// | ##### |
126
126
// |#######|
127
- func b5 (img * image.Paletted , x , y , size int , angle int ) {
127
+ func b5 (img * image.Paletted , x , y , size , angle int ) {
128
128
m := size / 2
129
129
drawBlock (img , x , y , size , angle , []int {
130
130
m , 0 ,
@@ -141,7 +141,7 @@ func b5(img *image.Paletted, x, y, size int, angle int) {
141
141
// |### |
142
142
// |### |
143
143
// --------
144
- func b6 (img * image.Paletted , x , y , size int , angle int ) {
144
+ func b6 (img * image.Paletted , x , y , size , angle int ) {
145
145
m := size / 2
146
146
drawBlock (img , x , y , size , angle , []int {
147
147
0 , 0 ,
@@ -160,7 +160,7 @@ func b6(img *image.Paletted, x, y, size int, angle int) {
160
160
// | #####|
161
161
// | ####|
162
162
// |--------
163
- func b7 (img * image.Paletted , x , y , size int , angle int ) {
163
+ func b7 (img * image.Paletted , x , y , size , angle int ) {
164
164
m := size / 2
165
165
drawBlock (img , x , y , size , angle , []int {
166
166
0 , 0 ,
@@ -181,7 +181,7 @@ func b7(img *image.Paletted, x, y, size int, angle int) {
181
181
// | ### ### |
182
182
// |#########|
183
183
// -----------
184
- func b8 (img * image.Paletted , x , y , size int , angle int ) {
184
+ func b8 (img * image.Paletted , x , y , size , angle int ) {
185
185
m := size / 2
186
186
mm := m / 2
187
187
@@ -219,7 +219,7 @@ func b8(img *image.Paletted, x, y, size int, angle int) {
219
219
// | #### |
220
220
// | # |
221
221
// ---------
222
- func b9 (img * image.Paletted , x , y , size int , angle int ) {
222
+ func b9 (img * image.Paletted , x , y , size , angle int ) {
223
223
m := size / 2
224
224
drawBlock (img , x , y , size , angle , []int {
225
225
0 , 0 ,
@@ -241,7 +241,7 @@ func b9(img *image.Paletted, x, y, size int, angle int) {
241
241
// |## |
242
242
// |# |
243
243
// ----------
244
- func b10 (img * image.Paletted , x , y , size int , angle int ) {
244
+ func b10 (img * image.Paletted , x , y , size , angle int ) {
245
245
m := size / 2
246
246
drawBlock (img , x , y , size , angle , []int {
247
247
m , 0 ,
@@ -267,7 +267,7 @@ func b10(img *image.Paletted, x, y, size int, angle int) {
267
267
// | |
268
268
// | |
269
269
// ----------
270
- func b11 (img * image.Paletted , x , y , size int , angle int ) {
270
+ func b11 (img * image.Paletted , x , y , size , angle int ) {
271
271
m := size / 2
272
272
drawBlock (img , x , y , size , angle , []int {
273
273
0 , 0 ,
@@ -287,7 +287,7 @@ func b11(img *image.Paletted, x, y, size int, angle int) {
287
287
// | ##### |
288
288
// | # |
289
289
// -----------
290
- func b12 (img * image.Paletted , x , y , size int , angle int ) {
290
+ func b12 (img * image.Paletted , x , y , size , angle int ) {
291
291
m := size / 2
292
292
drawBlock (img , x , y , size , angle , []int {
293
293
0 , m ,
@@ -306,7 +306,7 @@ func b12(img *image.Paletted, x, y, size int, angle int) {
306
306
// | ##### |
307
307
// |#########|
308
308
// -----------
309
- func b13 (img * image.Paletted , x , y , size int , angle int ) {
309
+ func b13 (img * image.Paletted , x , y , size , angle int ) {
310
310
m := size / 2
311
311
drawBlock (img , x , y , size , angle , []int {
312
312
m , m ,
@@ -325,7 +325,7 @@ func b13(img *image.Paletted, x, y, size int, angle int) {
325
325
// | |
326
326
// | |
327
327
// ---------
328
- func b14 (img * image.Paletted , x , y , size int , angle int ) {
328
+ func b14 (img * image.Paletted , x , y , size , angle int ) {
329
329
m := size / 2
330
330
drawBlock (img , x , y , size , angle , []int {
331
331
m , 0 ,
@@ -344,7 +344,7 @@ func b14(img *image.Paletted, x, y, size int, angle int) {
344
344
// | |
345
345
// | |
346
346
// ----------
347
- func b15 (img * image.Paletted , x , y , size int , angle int ) {
347
+ func b15 (img * image.Paletted , x , y , size , angle int ) {
348
348
m := size / 2
349
349
drawBlock (img , x , y , size , angle , []int {
350
350
0 , 0 ,
@@ -364,7 +364,7 @@ func b15(img *image.Paletted, x, y, size int, angle int) {
364
364
// | ##### |
365
365
// |#######|
366
366
// ---------
367
- func b16 (img * image.Paletted , x , y , size int , angle int ) {
367
+ func b16 (img * image.Paletted , x , y , size , angle int ) {
368
368
m := size / 2
369
369
drawBlock (img , x , y , size , angle , []int {
370
370
m , 0 ,
@@ -390,7 +390,7 @@ func b16(img *image.Paletted, x, y, size int, angle int) {
390
390
// | ##|
391
391
// | ##|
392
392
// ----------
393
- func b17 (img * image.Paletted , x , y , size int , angle int ) {
393
+ func b17 (img * image.Paletted , x , y , size , angle int ) {
394
394
m := size / 2
395
395
396
396
drawBlock (img , x , y , size , angle , []int {
@@ -419,7 +419,7 @@ func b17(img *image.Paletted, x, y, size int, angle int) {
419
419
// |## |
420
420
// |# |
421
421
// ----------
422
- func b18 (img * image.Paletted , x , y , size int , angle int ) {
422
+ func b18 (img * image.Paletted , x , y , size , angle int ) {
423
423
m := size / 2
424
424
425
425
drawBlock (img , x , y , size , angle , []int {
@@ -439,7 +439,7 @@ func b18(img *image.Paletted, x, y, size int, angle int) {
439
439
// |### ###|
440
440
// |########|
441
441
// ----------
442
- func b19 (img * image.Paletted , x , y , size int , angle int ) {
442
+ func b19 (img * image.Paletted , x , y , size , angle int ) {
443
443
m := size / 2
444
444
445
445
drawBlock (img , x , y , size , angle , []int {
@@ -480,7 +480,7 @@ func b19(img *image.Paletted, x, y, size int, angle int) {
480
480
// |## |
481
481
// |# |
482
482
// ----------
483
- func b20 (img * image.Paletted , x , y , size int , angle int ) {
483
+ func b20 (img * image.Paletted , x , y , size , angle int ) {
484
484
m := size / 2
485
485
q := size / 4
486
486
@@ -501,7 +501,7 @@ func b20(img *image.Paletted, x, y, size int, angle int) {
501
501
// |## |
502
502
// |# |
503
503
// ----------
504
- func b21 (img * image.Paletted , x , y , size int , angle int ) {
504
+ func b21 (img * image.Paletted , x , y , size , angle int ) {
505
505
m := size / 2
506
506
q := size / 4
507
507
@@ -529,7 +529,7 @@ func b21(img *image.Paletted, x, y, size int, angle int) {
529
529
// |## ##|
530
530
// |# #|
531
531
// ----------
532
- func b22 (img * image.Paletted , x , y , size int , angle int ) {
532
+ func b22 (img * image.Paletted , x , y , size , angle int ) {
533
533
m := size / 2
534
534
q := size / 4
535
535
@@ -557,7 +557,7 @@ func b22(img *image.Paletted, x, y, size int, angle int) {
557
557
// |## |
558
558
// |# |
559
559
// ----------
560
- func b23 (img * image.Paletted , x , y , size int , angle int ) {
560
+ func b23 (img * image.Paletted , x , y , size , angle int ) {
561
561
m := size / 2
562
562
q := size / 4
563
563
@@ -585,7 +585,7 @@ func b23(img *image.Paletted, x, y, size int, angle int) {
585
585
// |## ## |
586
586
// |# # |
587
587
// ----------
588
- func b24 (img * image.Paletted , x , y , size int , angle int ) {
588
+ func b24 (img * image.Paletted , x , y , size , angle int ) {
589
589
m := size / 2
590
590
q := size / 4
591
591
@@ -613,7 +613,7 @@ func b24(img *image.Paletted, x, y, size int, angle int) {
613
613
// |###### |
614
614
// |#### |
615
615
// ----------
616
- func b25 (img * image.Paletted , x , y , size int , angle int ) {
616
+ func b25 (img * image.Paletted , x , y , size , angle int ) {
617
617
m := size / 2
618
618
q := size / 4
619
619
@@ -641,7 +641,7 @@ func b25(img *image.Paletted, x, y, size int, angle int) {
641
641
// |### ###|
642
642
// |# #|
643
643
// ----------
644
- func b26 (img * image.Paletted , x , y , size int , angle int ) {
644
+ func b26 (img * image.Paletted , x , y , size , angle int ) {
645
645
m := size / 2
646
646
q := size / 4
647
647
@@ -683,7 +683,7 @@ func b26(img *image.Paletted, x, y, size int, angle int) {
683
683
// |### ##|
684
684
// |########|
685
685
// ----------
686
- func b27 (img * image.Paletted , x , y , size int , angle int ) {
686
+ func b27 (img * image.Paletted , x , y , size , angle int ) {
687
687
m := size / 2
688
688
q := size / 4
689
689
0 commit comments