Code: Select all
// if Canvas.Brush.Color<>clNone then
if (Canvas.Brush.Color and $FFFFFF) <> (clNone and $FFFFFF) then
The line if Canvas.Brush.Color<>clNone is always true, because the high order byte of Canvas.Brush.Color is different as the high order byte of clNone (at least on my system / printer).
I don't know which part of the system (printer / printer driver / printer spooler) crashes, but one of them definately doesn't like the printing of loads of white rectangles.