pcb

Off-by-one display bug

Bug #699039 reported by nobody on 2005-01-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gEDA project
Low
Unassigned
pcb
Medium
Unassigned

Bug Description

Karel Kulhavy
clock -=[at]=-twibright -=[dot]=- com
pcb 20040903
A thick horizontal line and a rectangle share common
edge. The line is at the bottom, rectangle at the top.
The coordinates are exactly the same. Rectangle and line
are on the same layer.

On some zoom levels there is a row of background pixels
drawn between them, althought there isn not background
between them in fact. On other zoom levels it isn't
drawn.

Ben Jackson (ben.jackson) wrote :

While reproducing this, I found you can go one better-- I drew a 40mil box over a 40mil line and at some zoom levels (lesstif HID) both were the same height, but the polygon was offset by 1px higher than the line.

I'm sure this is due to lines being drawn along their centers with a thickness vs polygons being drawn as rectangles/polygons. At some zoom levels round(center)-round(width/2) does not equal round(center-width/2). Similarly in the positive direction. Plus, line thickness is always symmetrical around the center of the line, while the rectangle is not so constrained.

Fixing it would probably require not using XDrawLine at all, so that the PCB HID code had total control over all of the math. There would be a performance penalty. It might be easier to cheat the rect code to fix this, although a fix for one set of potential overlapping lines might break another.

DJ Delorie (djdelorie) wrote :

The lesstif HID still does this, but it's just a drawing artifact. Do we really need to worry about this?

Peter Clifton (pcjc2) on 2011-01-14
tags: added: lesstif-gui
Felix Ruoff (felixruoff) wrote :

Set status to incomplete, because nobody has written, that this bug is important to him/her since four years now.

Changed in pcb:
status: New → Incomplete
Traumflug (mah-jump-ing) on 2015-09-27
Changed in geda-project:
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers