update for d2d
add padding and scale