This document explains how images are placed on a Side for printing, based on the interaction between the template's Clipping Box for the image item, and the Pack data's Image Box representing where the image should be placed underneath the canvas.
Just for absolute clarity this section shall define some rules and assumptions we are making going forward with this document
Firstly there are 4 areas worth considering:
These 3 areas are demonstrated in the example below
Note that in the images the Print Area and Clipping Box are assumed to exactly overlap each other.
We can rotate both the image box and the clipping box independently of each other. Both start at a default position of 0 degrees rotation, and each get rotated in relation to this starting point, and not to each other.
Following are examples of rotation which should give you a clearer idea of how the image box and the clipping box relate to each others when rotating
In this example we are rotating both the clipping box and the image box by 30 degrees.
As mentioned above the rotation is relative to the starting point, so rotating both boxes by the same angle ensures that they will still fit perfectly into each other.
Similarly we can rotate both by -30 degrees. This has exactly the same effect, except the rotation has happened in the opposite direction.
One thing to bear in mind in that rotating by -30 degrees and rotating by 330 degrees is ultimately the same thing
In this example we have rotated the image box (represented by the red outline) by 45 degrees while the clipping box (green outline) is unrotated.
A few things to note about this example.
All the examples above assume the image box is the same size as the clipping box, and that the centre point of both is the same.
However that usually not the case, and so we need to cater for non central or smaller images.
The rule is that all image boxes are rotated around their own centre point without prejudice.
Once rotation is applied there is no snap to fit cleverness that attempts to align corners.
We start with an image quarter the size of the clipping box which is aligned in the top left hand corner.
We apply a 45 degree rotation to it. To get the result below
Note that now the image is rotated, and most of the image remains within the clipping box.
If you look at the centre point of the result image, and the original image you will notice that they are exactly the same.
If we then apply another 45 degree rotation to give us a 90degree rotation we get the image below
Again note that we no longer have the image tucked up against the corner, and that some of the image sits outside the clipping box. Although again you will note that the centre point is exactly the same