Look at result of this script:
-----
canvas .c -bg white
grid .c
set x1 20
set x2 22
set y2 105
for {set f 0} {$f<50} {incr f} {
set y1 [expr {$y2-0.05*$f}]
.c create rectangle $x1 $y1 $x2 $y2 -fill black
incr x1 2
incr x2 2
}
-----
On Windows XP I see that at left side of figure bottom margin is one pixel lower than at right side. But it shouldn't happen as y2 is the same
(105) for all rectangles. Also, DKF confirmed the bug on OSX, and with both 8.5 and 8.6.
Also, here is the model to demonstrate Tk's behaviour. Green rectangles are actual coords provided, colored rectangles show how Tk draws them:
-----
canvas .c -bg white -highlightthickness 0
grid .c
for {set f 0} {$f<500} {incr f 20} {
.c create line $f 0 $f 2000 -width 0 -fill grey
.c create line 0 $f 2000 $f -width 0 -fill grey
}
set x1 20
set x2 40
set y2 200
for {set f 1} {$f<20} {incr f} {
set y1 [expr {$y2-5*$f}]
if {($y2-$y1)<20} {
set a [.c create rectangle $x1 $y2 $x2 [expr {$y2+20}] -fill red -width 0]
} else {
set a [.c create rectangle $x1 [expr {round($y1/20.0)*20}] $x2 $y2 -fill lightblue -width 0]
}
.c lower $a
.c create rectangle $x1 $y1 $x2 $y2 -outline darkgreen
incr x1 20
incr x2 20
}
-----