added correct handlingng of lifting and lowering pen in raster draw