added polygon rasterize method