diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
commit | 267c6f2ac71f92999e969232431ba04678e7437e (patch) | |
tree | 358c9467650e1d0a1d7227a21dac2e3d08b622b2 /include/vcl/rendercontext | |
parent | Initial commit. (diff) | |
download | libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip |
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/vcl/rendercontext')
-rw-r--r-- | include/vcl/rendercontext/AddFontSubstituteFlags.hxx | 38 | ||||
-rw-r--r-- | include/vcl/rendercontext/AntialiasingFlags.hxx | 38 | ||||
-rw-r--r-- | include/vcl/rendercontext/DrawGridFlags.hxx | 38 | ||||
-rw-r--r-- | include/vcl/rendercontext/DrawImageFlags.hxx | 41 | ||||
-rw-r--r-- | include/vcl/rendercontext/DrawModeFlags.hxx | 58 | ||||
-rw-r--r-- | include/vcl/rendercontext/DrawTextFlags.hxx | 52 | ||||
-rw-r--r-- | include/vcl/rendercontext/GetDefaultFontFlags.hxx | 36 | ||||
-rw-r--r-- | include/vcl/rendercontext/ImplMapRes.hxx | 36 | ||||
-rw-r--r-- | include/vcl/rendercontext/InvertFlags.hxx | 37 | ||||
-rw-r--r-- | include/vcl/rendercontext/RasterOp.hxx | 31 | ||||
-rw-r--r-- | include/vcl/rendercontext/SalLayoutFlags.hxx | 44 | ||||
-rw-r--r-- | include/vcl/rendercontext/State.hxx | 122 | ||||
-rw-r--r-- | include/vcl/rendercontext/SystemTextColorFlags.hxx | 37 |
13 files changed, 608 insertions, 0 deletions
diff --git a/include/vcl/rendercontext/AddFontSubstituteFlags.hxx b/include/vcl/rendercontext/AddFontSubstituteFlags.hxx new file mode 100644 index 0000000000..d2cb90a28a --- /dev/null +++ b/include/vcl/rendercontext/AddFontSubstituteFlags.hxx @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <o3tl/typed_flags_set.hxx> + +enum class AddFontSubstituteFlags +{ + NONE = 0x00, + ALWAYS = 0x01, + ScreenOnly = 0x02, +}; +namespace o3tl +{ +template <> +struct typed_flags<AddFontSubstituteFlags> : is_typed_flags<AddFontSubstituteFlags, 0x03> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/rendercontext/AntialiasingFlags.hxx b/include/vcl/rendercontext/AntialiasingFlags.hxx new file mode 100644 index 0000000000..98ce2e882f --- /dev/null +++ b/include/vcl/rendercontext/AntialiasingFlags.hxx @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <o3tl/typed_flags_set.hxx> + +enum class AntialiasingFlags +{ + NONE = 0x0000, + DisableText = 0x0001, + Enable = 0x0002, + PixelSnapHairline = 0x0004, +}; +namespace o3tl +{ +template <> struct typed_flags<AntialiasingFlags> : is_typed_flags<AntialiasingFlags, 0x07> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/rendercontext/DrawGridFlags.hxx b/include/vcl/rendercontext/DrawGridFlags.hxx new file mode 100644 index 0000000000..4d783e7809 --- /dev/null +++ b/include/vcl/rendercontext/DrawGridFlags.hxx @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <o3tl/typed_flags_set.hxx> + +enum class DrawGridFlags +{ + NONE = 0x0000, + Dots = 0x0001, + HorzLines = 0x0002, + VertLines = 0x0004 +}; +namespace o3tl +{ +template <> struct typed_flags<DrawGridFlags> : is_typed_flags<DrawGridFlags, 0x0007> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/rendercontext/DrawImageFlags.hxx b/include/vcl/rendercontext/DrawImageFlags.hxx new file mode 100644 index 0000000000..014b552dec --- /dev/null +++ b/include/vcl/rendercontext/DrawImageFlags.hxx @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <o3tl/typed_flags_set.hxx> + +// Flags for DrawImage(), these must match the definitions in css::awt::ImageDrawMode +enum class DrawImageFlags +{ + NONE = 0x0000, + Disable = 0x0001, + Highlight = 0x0002, + Deactive = 0x0004, + ColorTransform = 0x0008, + SemiTransparent = 0x0010, +}; +namespace o3tl +{ +template <> struct typed_flags<DrawImageFlags> : is_typed_flags<DrawImageFlags, 0x001f> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/rendercontext/DrawModeFlags.hxx b/include/vcl/rendercontext/DrawModeFlags.hxx new file mode 100644 index 0000000000..b51b1798e8 --- /dev/null +++ b/include/vcl/rendercontext/DrawModeFlags.hxx @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <sal/types.h> +#include <o3tl/typed_flags_set.hxx> + +enum class DrawModeFlags : sal_uInt32 +{ + Default = 0x00000000, + BlackLine = 0x00000001, + BlackFill = 0x00000002, + BlackText = 0x00000004, + BlackBitmap = 0x00000008, + BlackGradient = 0x00000010, + GrayLine = 0x00000020, + GrayFill = 0x00000040, + GrayText = 0x00000080, + GrayBitmap = 0x00000100, + GrayGradient = 0x00000200, + NoFill = 0x00000400, + WhiteLine = 0x00000800, + WhiteFill = 0x00001000, + WhiteText = 0x00002000, + WhiteBitmap = 0x00004000, + WhiteGradient = 0x00008000, + SettingsLine = 0x00010000, + SettingsFill = 0x00020000, + SettingsText = 0x00040000, + SettingsGradient = 0x00080000, + SettingsForSelection = 0x00100000, + NoTransparency = 0x00200000, +}; +namespace o3tl +{ +template <> struct typed_flags<DrawModeFlags> : is_typed_flags<DrawModeFlags, 0x3fffff> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/rendercontext/DrawTextFlags.hxx b/include/vcl/rendercontext/DrawTextFlags.hxx new file mode 100644 index 0000000000..4eb4c45b60 --- /dev/null +++ b/include/vcl/rendercontext/DrawTextFlags.hxx @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <o3tl/typed_flags_set.hxx> + +enum class DrawTextFlags +{ + NONE = 0x00000000, + Disable = 0x00000001, + Mnemonic = 0x00000002, + Mono = 0x00000004, + Clip = 0x00000008, + Left = 0x00000010, + Center = 0x00000020, + Right = 0x00000040, + Top = 0x00000080, + VCenter = 0x00000100, + Bottom = 0x00000200, + EndEllipsis = 0x00000400, + PathEllipsis = 0x00000800, + MultiLine = 0x00001000, + WordBreak = 0x00002000, + NewsEllipsis = 0x00004000, + WordBreakHyphenation = 0x00008000 | WordBreak, + CenterEllipsis = 0x00010000, +}; +namespace o3tl +{ +template <> struct typed_flags<DrawTextFlags> : is_typed_flags<DrawTextFlags, 0x1ffff> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/rendercontext/GetDefaultFontFlags.hxx b/include/vcl/rendercontext/GetDefaultFontFlags.hxx new file mode 100644 index 0000000000..a100e2f2f4 --- /dev/null +++ b/include/vcl/rendercontext/GetDefaultFontFlags.hxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <o3tl/typed_flags_set.hxx> + +enum class GetDefaultFontFlags +{ + NONE = 0x0000, + OnlyOne = 0x0001, +}; +namespace o3tl +{ +template <> struct typed_flags<GetDefaultFontFlags> : is_typed_flags<GetDefaultFontFlags, 0x01> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/rendercontext/ImplMapRes.hxx b/include/vcl/rendercontext/ImplMapRes.hxx new file mode 100644 index 0000000000..7a88a15af9 --- /dev/null +++ b/include/vcl/rendercontext/ImplMapRes.hxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <tools/long.hxx> + +struct ImplMapRes +{ + ImplMapRes() = default; + + tools::Long mnMapOfsX = 0; ///< Offset in X direction + tools::Long mnMapOfsY = 0; ///< Offset in Y direction + tools::Long mnMapScNumX = 1; ///< Scaling factor - numerator in X direction + tools::Long mnMapScNumY = 1; ///< Scaling factor - numerator in Y direction + tools::Long mnMapScDenomX = 1; ///< Scaling factor - denominator in X direction + tools::Long mnMapScDenomY = 1; ///< Scaling factor - denominator in Y direction +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/rendercontext/InvertFlags.hxx b/include/vcl/rendercontext/InvertFlags.hxx new file mode 100644 index 0000000000..86fe96fd42 --- /dev/null +++ b/include/vcl/rendercontext/InvertFlags.hxx @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <o3tl/typed_flags_set.hxx> + +enum class InvertFlags +{ + NONE = 0x0000, + N50 = 0x0001, + TrackFrame = 0x0002 +}; +namespace o3tl +{ +template <> struct typed_flags<InvertFlags> : is_typed_flags<InvertFlags, 0x0003> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/rendercontext/RasterOp.hxx b/include/vcl/rendercontext/RasterOp.hxx new file mode 100644 index 0000000000..44b2a6c03a --- /dev/null +++ b/include/vcl/rendercontext/RasterOp.hxx @@ -0,0 +1,31 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +enum class RasterOp +{ + OverPaint, + Xor, + N0, + N1, + Invert +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/rendercontext/SalLayoutFlags.hxx b/include/vcl/rendercontext/SalLayoutFlags.hxx new file mode 100644 index 0000000000..576a4abd8f --- /dev/null +++ b/include/vcl/rendercontext/SalLayoutFlags.hxx @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <o3tl/typed_flags_set.hxx> + +enum class SalLayoutFlags +{ + NONE = 0x0000, + BiDiRtl = 0x0001, + BiDiStrong = 0x0002, + RightAlign = 0x0004, + DisableKerning = 0x0010, + KerningAsian = 0x0020, + Vertical = 0x0040, + DisableLigatures = 0x0200, + ForFallback = 0x2000, + GlyphItemsOnly = 0x4000, +}; +namespace o3tl +{ +template <> struct typed_flags<SalLayoutFlags> : is_typed_flags<SalLayoutFlags, 0x6277> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/vcl/rendercontext/State.hxx b/include/vcl/rendercontext/State.hxx new file mode 100644 index 0000000000..0359a486e4 --- /dev/null +++ b/include/vcl/rendercontext/State.hxx @@ -0,0 +1,122 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <tools/color.hxx> +#include <tools/gen.hxx> +#include <tools/fontenum.hxx> +#include <i18nlangtag/lang.h> +#include <o3tl/typed_flags_set.hxx> + +#include <vcl/rendercontext/RasterOp.hxx> +#include <vcl/font.hxx> +#include <vcl/mapmod.hxx> +#include <vcl/region.hxx> + +#include <memory> +#include <optional> + +namespace vcl +{ +// Flags for OutputDevice::Push() and State +enum class PushFlags +{ + NONE = 0x0000, + LINECOLOR = 0x0001, + FILLCOLOR = 0x0002, + FONT = 0x0004, + TEXTCOLOR = 0x0008, + MAPMODE = 0x0010, + CLIPREGION = 0x0020, + RASTEROP = 0x0040, + TEXTFILLCOLOR = 0x0080, + TEXTALIGN = 0x0100, + REFPOINT = 0x0200, + TEXTLINECOLOR = 0x0400, + TEXTLAYOUTMODE = 0x0800, + TEXTLANGUAGE = 0x1000, + OVERLINECOLOR = 0x2000, + RTLENABLED = 0x4000, + ALL = 0xFFFF +}; +} + +namespace o3tl +{ +template <> struct typed_flags<vcl::PushFlags> : is_typed_flags<vcl::PushFlags, 0xFFFF> +{ +}; +} +#define PUSH_ALLFONT \ + (vcl::PushFlags::TEXTCOLOR | vcl::PushFlags::TEXTFILLCOLOR | vcl::PushFlags::TEXTLINECOLOR \ + | vcl::PushFlags::OVERLINECOLOR | vcl::PushFlags::TEXTALIGN | vcl::PushFlags::TEXTLAYOUTMODE \ + | vcl::PushFlags::TEXTLANGUAGE | vcl::PushFlags::RTLENABLED | vcl::PushFlags::FONT) + +namespace vcl::text +{ +// Layout flags for Complex Text Layout +// These are flag values, i.e they can be combined +enum class ComplexTextLayoutFlags : sal_uInt8 +{ + Default = 0x0000, + BiDiRtl = 0x0001, + BiDiStrong = 0x0002, + TextOriginLeft = 0x0004, + TextOriginRight = 0x0008 +}; +} + +namespace o3tl +{ +template <> +struct typed_flags<vcl::text::ComplexTextLayoutFlags> + : is_typed_flags<vcl::text::ComplexTextLayoutFlags, 0x000f> +{ +}; +} + +namespace vcl +{ +struct State +{ + State() = default; + State(State&&) = default; + + std::unique_ptr<vcl::Region> mpClipRegion; + std::optional<MapMode> mpMapMode; + std::optional<vcl::Font> mpFont; + std::optional<Point> mpRefPoint; + std::optional<Color> mpLineColor; + std::optional<Color> mpFillColor; + std::optional<Color> mpTextColor; + std::optional<Color> mpTextFillColor; + std::optional<Color> mpTextLineColor; + std::optional<Color> mpOverlineColor; + TextAlign meTextAlign = ALIGN_TOP; + RasterOp meRasterOp = RasterOp::OverPaint; + text::ComplexTextLayoutFlags mnTextLayoutMode = text::ComplexTextLayoutFlags::Default; + LanguageType meTextLanguage = LANGUAGE_SYSTEM; + PushFlags mnFlags = PushFlags::NONE; + bool mbMapActive = false; + bool mbRTLEnabled = false; +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/rendercontext/SystemTextColorFlags.hxx b/include/vcl/rendercontext/SystemTextColorFlags.hxx new file mode 100644 index 0000000000..459c219458 --- /dev/null +++ b/include/vcl/rendercontext/SystemTextColorFlags.hxx @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <o3tl/typed_flags_set.hxx> + +enum class SystemTextColorFlags +{ + NONE = 0x0000, + Mono = 0x0001, + NoControls = 0x0004, +}; +namespace o3tl +{ +template <> struct typed_flags<SystemTextColorFlags> : is_typed_flags<SystemTextColorFlags, 0x0005> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |