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
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:
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>
76 /// The top, left matrix entry.
79 /// The top, right matrix entry.
82 /// The bottom, left matrix entry.
85 /// The bottom, right matrix entry.
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */