pcb

Comment 1 for bug 699039

Revision history for this message
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.