Refactoring Painter to handle DualCoordinateImages.