1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsTransform2D.h"
9 void nsTransform2D ::TransformCoord(nscoord
* ptX
, nscoord
* ptY
) const {
10 *ptX
= NSToCoordRound(*ptX
* m00
+ m20
);
11 *ptY
= NSToCoordRound(*ptY
* m11
+ m21
);
14 void nsTransform2D ::TransformCoord(nscoord
* aX
, nscoord
* aY
, nscoord
* aWidth
,
15 nscoord
* aHeight
) const {
16 nscoord x2
= *aX
+ *aWidth
;
17 nscoord y2
= *aY
+ *aHeight
;
18 TransformCoord(aX
, aY
);
19 TransformCoord(&x2
, &y2
);