LibreOffice Module vcl (master) 1
salgtype.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#ifndef INCLUDED_VCL_SALGTYPE_HXX
21#define INCLUDED_VCL_SALGTYPE_HXX
22
24#include <tools/color.hxx>
25#include <tools/gen.hxx>
26#include <ostream>
27
28enum class DeviceFormat {
29 NONE = -1,
30 DEFAULT = 0,
31#ifdef IOS
32 GRAYSCALE = 8
33#endif
34 };
35
36constexpr ::Color SALCOLOR_NONE ( ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF );
37
39{
48
49 SalTwoRect(tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight,
50 tools::Long nDestX, tools::Long nDestY, tools::Long nDestWidth, tools::Long nDestHeight)
51 : mnSrcX(nSrcX), mnSrcY(nSrcY), mnSrcWidth(nSrcWidth), mnSrcHeight(nSrcHeight)
52 , mnDestX(nDestX), mnDestY(nDestY), mnDestWidth(nDestWidth), mnDestHeight(nDestHeight)
53 {
54 }
55};
56
57template <typename charT, typename traits>
58inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& stream,
59 const SalTwoRect& rPosAry)
60{
61 tools::Rectangle aSrcRect(rPosAry.mnSrcX, rPosAry.mnSrcY, rPosAry.mnSrcX + rPosAry.mnSrcWidth,
62 rPosAry.mnSrcY + rPosAry.mnSrcHeight);
63 tools::Rectangle aDestRect(rPosAry.mnDestX, rPosAry.mnDestY,
64 rPosAry.mnDestX + rPosAry.mnDestWidth,
65 rPosAry.mnDestY + rPosAry.mnDestHeight);
66 stream << aSrcRect << " => " << aDestRect;
67 return stream;
68}
69
70enum class SalROPColor {
71 N0, N1, Invert
72};
73
74enum class SalInvert {
75 NONE = 0x00,
76 N50 = 0x01,
77 TrackFrame = 0x02
78};
79namespace o3tl
80{
81 template<> struct typed_flags<SalInvert> : is_typed_flags<SalInvert, 0x03> {};
82}
83
84#endif // INCLUDED_VCL_SALGTYPE_HXX
85
86/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XOutputStream > stream
NONE
long Long
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &stream, const SalTwoRect &rPosAry)
Definition: salgtype.hxx:58
DeviceFormat
Definition: salgtype.hxx:28
SalROPColor
Definition: salgtype.hxx:70
SalInvert
Definition: salgtype.hxx:74
constexpr ::Color SALCOLOR_NONE(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
SalTwoRect(tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, tools::Long nDestX, tools::Long nDestY, tools::Long nDestWidth, tools::Long nDestHeight)
Definition: salgtype.hxx:49
tools::Long mnDestY
Definition: salgtype.hxx:45
tools::Long mnSrcX
Definition: salgtype.hxx:40
tools::Long mnDestWidth
Definition: salgtype.hxx:46
tools::Long mnSrcHeight
Definition: salgtype.hxx:43
tools::Long mnSrcWidth
Definition: salgtype.hxx:42
tools::Long mnSrcY
Definition: salgtype.hxx:41
tools::Long mnDestHeight
Definition: salgtype.hxx:47
tools::Long mnDestX
Definition: salgtype.hxx:44