tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / offapi / com / sun / star / geometry / AffineMatrix2D.idl
blob54344561eb758d86cbcecedb1418e3f8a4f9090d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com { module sun { module star { module geometry {
22 /** This structure defines a 2 by 3 affine matrix.<p>
24 The matrix defined by this structure constitutes an affine mapping
25 of a point in 2D to another point in 2D. The last line of a
26 complete 3 by 3 matrix is omitted, since it is implicitly assumed
27 to be [0,0,1].<p>
29 An affine mapping, as performed by this matrix, can be written out
30 as follows, where <code>xs</code> and <code>ys</code> are the source, and
31 <code>xd</code> and <code>yd</code> the corresponding result coordinates:
33 <code>
34 xd = m00*xs + m01*ys + m02;
35 yd = m10*xs + m11*ys + m12;
36 </code><p>
38 Thus, in common matrix language, with M being the
39 AffineMatrix2D and vs=[xs,ys]^T, vd=[xd,yd]^T two 2D
40 vectors, the affine transformation is written as
41 vd=M*vs. Concatenation of transformations amounts to
42 multiplication of matrices, i.e. a translation, given by T,
43 followed by a rotation, given by R, is expressed as vd=R*(T*vs) in
44 the above notation. Since matrix multiplication is associative,
45 this can be shortened to vd=(R*T)*vs=M'*vs. Therefore, a set of
46 consecutive transformations can be accumulated into a single
47 AffineMatrix2D, by multiplying the current transformation with the
48 additional transformation from the left.<p>
50 Due to this transformational approach, all geometry data types are
51 points in abstract integer or real coordinate spaces, without any
52 physical dimensions attached to them. This physical measurement
53 units are typically only added when using these data types to
54 render something onto a physical output device, like a screen or a
55 printer, Then, the total transformation matrix and the device
56 resolution determine the actual measurement unit.<p>
58 @since OOo 2.0
60 struct AffineMatrix2D
62 /// The top, left matrix entry.
63 double m00;
65 /// The top, middle matrix entry.
66 double m01;
68 /// The top, right matrix entry.
69 double m02;
71 /// The bottom, left matrix entry.
72 double m10;
74 /// The bottom, middle matrix entry.
75 double m11;
77 /// The bottom, right matrix entry.
78 double m12;
81 }; }; }; };
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */