Bug #170
openDrawing commands (at least Bar, Box and Draw) are offset by 1 pixel in both X and Y.
0%
Description
At first, I thought this was just the Bar command, but further testing showed that Bar, Box, and Draw (perhaps all?) drawing commands appear to be off by 1 pixel in both X and Y. (It might be good to check whether the screen or canvas is offset, just in case.)
The following example should produces solid vertical color bars all the way across the entire 320x200 drawing area with no space between them. Instead, you'll notice gray borders to the bottom and right of each bar:
#manifest: "amiga"
#speed: "safe"
Screen Open 0,320,200,32,Lowres
Palette $000,$888,$CCC,$FFF, $004,$008,$00C,$00F, $040,$080,$0C0,$0F0, $400,$800,$C00,$F00, $440,$880,$CC0,$FF0, $044,$088,$0CC,$0FF, $404,$808,$C0C,$F0F, $F70,$0F7,$70F,$7F0
Flash Off
For C=0 To 31
Ink C,,3 : Bar C*10,0 To C*10+9,199
Next C
This example should draw a black box just inside the drawing area with a 1 pixel white border all the way around. Instead, you'll notice that the top and left edges are thin and barely visible since they're offset by a pixel. I think what is visible is just an artifact from anti-aliasing.
#manifest: "amiga"
#speed: "safe"
Screen Open 0,320,200,32,Lowres
Palette $000,$888,$CCC,$FFF, $004,$008,$00C,$00F, $040,$080,$0C0,$0F0, $400,$800,$C00,$F00, $440,$880,$CC0,$FF0, $044,$088,$0CC,$0FF, $404,$808,$C0C,$F0F, $F70,$0F7,$70F,$7F0
Flash Off
Cls 3
Ink 0
Box 1,1 To 318,198
This last example illustrates the same problem with the Draw command. The results should be identical to the previous example, except that it is produced by Draw instead of Box:
#manifest: "amiga"
#speed: "safe"
Screen Open 0,320,200,32,Lowres
Palette $000,$888,$CCC,$FFF, $004,$008,$00C,$00F, $040,$080,$0C0,$0F0, $400,$800,$C00,$F00, $440,$880,$CC0,$FF0, $044,$088,$0CC,$0FF, $404,$808,$C0C,$F0F, $F70,$0F7,$70F,$7F0
Flash Off
Cls 3
Ink 0
Draw 1,1 To 318,1
Draw To 318,198
Draw To 1,198
Draw To 1,1
Again, the result should be a uniform black box with a uniform white border, but the top and left are offset.