I guess you are hoping that createpattern(4,1,2,3,3) will draw this pattern of grays:
1 2
3 3
But the code which sets colors is actually doing this:
ps2 ps3
ps4 ps4
which translates to
2 3
3 3
Anyway, I think the drawing code should be something like
1 2
3 3
But the code which sets colors is actually doing this:
ps2 ps3
ps4 ps4
which translates to
2 3
3 3
Anyway, I think the drawing code should be something like
SetBuffer ImageBuffer(imgcheese) For y=0 To 7 For x=0 To 7 c = 80*pat(x,y) Color c,c,c Rect (offset*16)+x*2,y*2,2,2,True Next Next