LibreOffice Module basegfx (master) 1
b2i64tuple.hxx
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
20#pragma once
21
22#include <sal/types.h>
25
26namespace basegfx
27{
37 {
38 public:
44 : Tuple2D(0, 0)
45 {}
46
57 B2I64Tuple(sal_Int64 nX, sal_Int64 nY)
58 : Tuple2D(nX, nY)
59 {}
60
67 : Tuple2D(rTup.mnX, rTup.mnY)
68 {}
69
70 // operators
71
73 {
74 return B2I64Tuple(-mnX, -mnY);
75 }
76
78 {
79 mnX = rTup.mnX;
80 mnY = rTup.mnY;
81 return *this;
82 }
83 };
84
85} // end of namespace basegfx
86
87/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define BASEGFX_DLLPUBLIC
Definition: basegfxdllapi.h:35
Base class for all Points/Vectors with two sal_Int64 values.
Definition: b2i64tuple.hxx:37
B2I64Tuple(const B2I64Tuple &rTup)
Create a copy of a 2D Tuple.
Definition: b2i64tuple.hxx:66
B2I64Tuple operator-(void) const
Definition: b2i64tuple.hxx:72
B2I64Tuple()
Create a 2D Tuple.
Definition: b2i64tuple.hxx:43
B2I64Tuple & operator=(const B2I64Tuple &rTup)
Definition: b2i64tuple.hxx:77
B2I64Tuple(sal_Int64 nX, sal_Int64 nY)
Create a 2D Tuple.
Definition: b2i64tuple.hxx:57
#define SAL_WARN_UNUSED