Hi folks, I'm trying to work with the Affine transform to superimpose a snapshot of an A4 document into an SRA3 document which has crop lines.
The SRA3 template size is or (8.86in x 12.6in) in inches. The original A4 document I'm taking the snapshot of is typical A4 ( 8.27in × 11.69in). I've taken a snapshot of the first page of the A4 original document and it produces an image in typical A4 size 2480 X 3508 pixels. I'm trying to figure out the AffineTransform that will place the A4 snapshot into the centre of the SRA3 document and within the croplines. So far I have AffineTransform at = new AffineTransform(700, 0, 0, 700, 100, 200); with the Affine constructor as follows * * @param m00 the X coordinate scaling element of the 3x3 matrix * @param m10 the Y coordinate shearing element of the 3x3 matrix * @param m01 the X coordinate shearing element of the 3x3 matrix * @param m11 the Y coordinate scaling element of the 3x3 matrix * @param m02 the X coordinate translation element of the 3x3 matrix * @param m12 the Y coordinate translation element of the 3x3 matrix * @since 1.2 */ @ConstructorProperties({ "scaleX", "shearY", "shearX", "scaleY", "translateX", "translateY" }) public AffineTransform(float m00, float m10, float m01, float m11, float m02, float m12) { I.e. x-scaling, y-shearing, x-shearing, y-scaling, x-translation, y-translation I guess the questions are 1. Why the signature was presented like this, it's quite unintuitive to place two shearing factors between two scaling. 2. Also I can't understand why the x & y scaling factors need to be in the hundreds. i.e. 700 and 700 3. The translation factors, are they taken from the top right of the image/object being imported or from the centre? Thanks in advance for any help folks, Mark. Aviva Insurance Limited, trading as Aviva, is authorised by the Prudential Regulation Authority in the UK and is regulated by the Central Bank of Ireland for conduct of business rules. Registered Branch Office in Ireland No 900175, Registered Branch Address One Park Place, Hatch Street, Dublin 2. Registered in Scotland No 2116. Registered Office Pitheavlis, Perth, PH2 0NH. Aviva Direct Ireland Limited is regulated by the Central Bank Of Ireland. A private company limited by shares. Registered in Ireland No 374895. Registered Office One Park Place, Hatch Street, Dublin 2. Aviva Life & Pensions UK Limited, trading as Aviva Life & Pensions Ireland, is authorised by the Prudential Regulation Authority in the UK and is regulated by the Central Bank of Ireland for conduct of business rules. Aviva Life & Pensions UK Limited, trading as Aviva Life & Pensions Ireland, is also regulated in the UK: by the Prudential Regulation Authority for prudential rules and, to a limited extent, by the Financial Conduct Authority for applicable UK conduct rules. Registered Branch Office in Ireland (No 906464) at One Park Place, Hatch Street, Dublin 2. Registered in England (3253947) at Wellington Row, York, YO90 1WR Aviva Life Services Ireland Limited is regulated by the Central Bank Of Ireland. A private company limited by shares. Registered in Ireland No 406616. Registered Office One Park Place, Hatch Street, Dublin 2. www.aviva.ie The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action or reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from your computer.