LibreOffice Module basegfx (master) 1
b2dpoint.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
23
24namespace basegfx
25{
26 B2DPoint& B2DPoint::operator*=( const ::basegfx::B2DHomMatrix& rMat )
27 {
28 double fTempX(
29 rMat.get(0, 0) * mfX +
30 rMat.get(0, 1) * mfY +
31 rMat.get(0, 2));
32 double fTempY(
33 rMat.get(1, 0) * mfX +
34 rMat.get(1, 1) * mfY +
35 rMat.get(1, 2));
36
37 mfX = fTempX;
38 mfY = fTempY;
39
40 return *this;
41 }
42
43 B2DPoint operator*( const ::basegfx::B2DHomMatrix& rMat, const B2DPoint& rPoint )
44 {
45 B2DPoint aRes( rPoint );
46 aRes *= rMat;
47 return aRes;
48 }
49} // end of namespace basegfx
50
51/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base Point class with two double values.
Definition: b2dpoint.hxx:42
B2DPoint & operator*=(const B2DPoint &rPnt)
*=operator to allow usage from B2DPoint, too
Definition: b2dpoint.hxx:88
B2DPoint operator*(const ::basegfx::B2DHomMatrix &rMat, const B2DPoint &rPoint)
Definition: b2dpoint.cxx:43