Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / geometry / Matrix2D.idl
blob7781e7c74585ee47db3ecf914e52b3c0f71b51cf
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_geometry_Matrix2D_idl__
29 #define __com_sun_star_geometry_Matrix2D_idl__
31 module com { module sun { module star { module geometry {
33 /** This structure defines a 2 by 2 matrix.<p>
35 This constitutes a linear mapping of a point in 2D to another
36 point in 2D.<p>
38 The matrix defined by this structure constitutes a linear
39 mapping of a point in 2D to another point in 2D. In contrast to
40 the <type>com.sun.star.geometry.AffineMatrix2D</type>, this
41 matrix does not include any translational components.<p>
43 A linear mapping, as performed by this matrix, can be written out
44 as follows, where <code>xs</code> and <code>ys</code> are the source, and
45 <code>xd</code> and <code>yd</code> the corresponding result coordinates:
47 <code>
48 xd = m00*xs + m01*ys;
49 yd = m10*xs + m11*ys;
50 </code><p>
52 Thus, in common matrix language, with M being the
53 <type>Matrix2D</type> and vs=[xs,ys]^T, vd=[xd,yd]^T two 2D
54 vectors, the linear mapping is written as
55 vd=M*vs. Concatenation of transformations amounts to
56 multiplication of matrices, i.e. a scaling, given by S,
57 followed by a rotation, given by R, is expressed as vd=R*(S*vs) in
58 the above notation. Since matrix multiplication is associative,
59 this can be shortened to vd=(R*S)*vs=M'*vs. Therefore, a set of
60 consecutive transformations can be accumulated into a single
61 Matrix2D, by multiplying the current transformation with the
62 additional transformation from the left.<p>
64 Due to this transformational approach, all geometry data types are
65 points in abstract integer or real coordinate spaces, without any
66 physical dimensions attached to them. This physical measurement
67 units are typically only added when using these data types to
68 render something onto a physical output device, like a screen or a
69 printer. Then, the total transformation matrix and the device
70 resolution determine the actual measurement unit.<p>
72 @since OOo 2.0
74 struct Matrix2D
76 /// The top, left matrix entry.
77 double m00;
79 /// The top, right matrix entry.
80 double m01;
82 /// The bottom, left matrix entry.
83 double m10;
85 /// The bottom, right matrix entry.
86 double m11;
89 }; }; }; };
91 #endif
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */