1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef __com_sun_star_geometry_Matrix2D_idl__
20 #define __com_sun_star_geometry_Matrix2D_idl__
22 module com
{ module sun
{ module star
{ module geometry
{
24 /** This structure defines a 2 by 2 matrix.<p>
26 This constitutes a linear mapping of a point in 2D to another
29 The matrix defined by this structure constitutes a linear
30 mapping of a point in 2D to another point in 2D. In contrast to
31 the com.sun.star.geometry.AffineMatrix2D, this
32 matrix does not include any translational components.<p>
34 A linear mapping, as performed by this matrix, can be written out
35 as follows, where <code>xs</code> and <code>ys</code> are the source, and
36 <code>xd</code> and <code>yd</code> the corresponding result coordinates:
43 Thus, in common matrix language, with M being the
44 Matrix2D and vs=[xs,ys]^T, vd=[xd,yd]^T two 2D
45 vectors, the linear mapping is written as
46 vd=M*vs. Concatenation of transformations amounts to
47 multiplication of matrices, i.e. a scaling, given by S,
48 followed by a rotation, given by R, is expressed as vd=R*(S*vs) in
49 the above notation. Since matrix multiplication is associative,
50 this can be shortened to vd=(R*S)*vs=M'*vs. Therefore, a set of
51 consecutive transformations can be accumulated into a single
52 Matrix2D, by multiplying the current transformation with the
53 additional transformation from the left.<p>
55 Due to this transformational approach, all geometry data types are
56 points in abstract integer or real coordinate spaces, without any
57 physical dimensions attached to them. This physical measurement
58 units are typically only added when using these data types to
59 render something onto a physical output device, like a screen or a
60 printer. Then, the total transformation matrix and the device
61 resolution determine the actual measurement unit.<p>
67 /// The top, left matrix entry.
70 /// The top, right matrix entry.
73 /// The bottom, left matrix entry.
76 /// The bottom, right matrix entry.
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */