A fast algorithm for general raster rotation