When a rect shape is specified, paint it directly instead of converting to a path, since this might be much cheaper.
Work-in-progress, currently performance is sub-optimal (software rendering via QPainter API).