Rotation of contents
Objects that are output with <PlaceObject> can be rotated.
For this purpose, there is the attribute rotate, which expects an angle (in degrees), whereas positive values cause a clockwise rotation.
<PlaceObject rotate="10">
<Image file="_sampleb.pdf" width="3"/>
</PlaceObject>
When an object is rotated, you need to specify the point around which it should rotate.
The default setting is the upper left corner.
With the attributes origin-x (left, center and right) and origin-y (top, center, bottom) you can define the axis of rotation.
In addition to these values, numbers from 0 to 100 are also possible, the upper left corner is 0, 0 and the lower right corner is 100, 100.
In examples repository on github there is a document in the technical directory which shows the effect of origin-x and origin-y.
|
Rotate images
The attribute rotate is available for both <PlaceObject> and <Image>. The attribute at <Image> can only rotate images in 90° steps. Therefore, in practice the rotation is rather controlled by <PlaceObject>.
Rotate via transformation
Using the command <Transformation> (see section Transformation and in the appendix the command description) you can also rotate contents.
The matrix has the form "cos θ sin θ -sin θ cos θ 0 0", for a rotation of 90 degrees thus "0 1 -1 0 0 0".
This is shown in the section Image behind the text.