Project

General

Profile

Bug #170

Drawing commands (at least Bar, Box and Draw) are offset by 1 pixel in both X and Y.

Added by Brian Flanagan about 4 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Target version:
-
Start date:
02/09/2020
Due date:
% Done:

0%

Estimated time:
3:00 h
Affected version:

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.

#1

Updated by Brian Flanagan almost 4 years ago

  • Affected version changed from 0.9.4 to 0.9.9.1

Re-tested this again in 0.9.9.1 Test 1.

Still broken.

#2

Updated by Brian Flanagan over 3 years ago

  • Priority changed from Normal to High
  • Estimated time set to 3:00 h
  • Affected version changed from 0.9.9.1 to Beta RC3

Re-tested in Beta RC3. Still broken.

#3

Updated by Brian Flanagan over 3 years ago

  • Affected version changed from Beta RC3 to Beta 2

I corrected the problem with Bar (and with Polygon - similar issue).

Some of the other issues still exist.

#4

Updated by David Baldwin over 2 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF