Use an object to define parameters to getPixmap