Implemented a bounding rect check for faster rasterization.