Bump version to 21.06.18.1
[LibreOffice.git] / include / vcl / salgtype.hxx
blob902170555526d53cf425f798f72d85da2fa0f0e8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_VCL_SALGTYPE_HXX
21 #define INCLUDED_VCL_SALGTYPE_HXX
23 #include <o3tl/typed_flags_set.hxx>
24 #include <tools/color.hxx>
25 #include <tools/gen.hxx>
26 #include <ostream>
28 enum class DeviceFormat {
29 NONE = -1,
30 DEFAULT = 0,
31 BITMASK = 1,
32 #ifdef IOS
33 GRAYSCALE = 8
34 #endif
37 constexpr ::Color SALCOLOR_NONE ( 0xFF, 0xFF, 0xFF, 0xFF );
39 struct SalTwoRect
41 tools::Long mnSrcX;
42 tools::Long mnSrcY;
43 tools::Long mnSrcWidth;
44 tools::Long mnSrcHeight;
45 tools::Long mnDestX;
46 tools::Long mnDestY;
47 tools::Long mnDestWidth;
48 tools::Long mnDestHeight;
50 SalTwoRect(tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight,
51 tools::Long nDestX, tools::Long nDestY, tools::Long nDestWidth, tools::Long nDestHeight)
52 : mnSrcX(nSrcX), mnSrcY(nSrcY), mnSrcWidth(nSrcWidth), mnSrcHeight(nSrcHeight)
53 , mnDestX(nDestX), mnDestY(nDestY), mnDestWidth(nDestWidth), mnDestHeight(nDestHeight)
58 template <typename charT, typename traits>
59 inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& stream,
60 const SalTwoRect& rPosAry)
62 tools::Rectangle aSrcRect(rPosAry.mnSrcX, rPosAry.mnSrcY, rPosAry.mnSrcX + rPosAry.mnSrcWidth,
63 rPosAry.mnSrcY + rPosAry.mnSrcHeight);
64 tools::Rectangle aDestRect(rPosAry.mnDestX, rPosAry.mnDestY,
65 rPosAry.mnDestX + rPosAry.mnDestWidth,
66 rPosAry.mnDestY + rPosAry.mnDestHeight);
67 stream << aSrcRect << " => " << aDestRect;
68 return stream;
71 enum class SalROPColor {
72 N0, N1, Invert
75 enum class SalInvert {
76 NONE = 0x00,
77 N50 = 0x01,
78 TrackFrame = 0x02
80 namespace o3tl
82 template<> struct typed_flags<SalInvert> : is_typed_flags<SalInvert, 0x03> {};
85 #endif // INCLUDED_VCL_SALGTYPE_HXX
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */