Fix QPaintDevice error in raster/line impact function