0

I have a PostScript object having a known bbox. I want to insert this object into the current image where I known the bbox which this inserted object should have in the current user space. How can I calculate, in PostScript code, the transformation matrix which should be concatenated to the CTM in order to get the expected result ? Note that translation, scaling and rotation may be necessary.

1 Answers1

0
  1. Scale the existing box down the unit square. 1 width div 1 height div scale
  2. Scale it up to the desired dimensions. wid hgt scale

(3. Adjust position if necessary)