implemented transformation for raster graphics, fixed bugs