summaryrefslogtreecommitdiffstats
path: root/include/vcl/pdf/PDFAnnotationMarker.hxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /include/vcl/pdf/PDFAnnotationMarker.hxx
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/vcl/pdf/PDFAnnotationMarker.hxx')
-rw-r--r--include/vcl/pdf/PDFAnnotationMarker.hxx77
1 files changed, 77 insertions, 0 deletions
diff --git a/include/vcl/pdf/PDFAnnotationMarker.hxx b/include/vcl/pdf/PDFAnnotationMarker.hxx
new file mode 100644
index 000000000..c4be54d69
--- /dev/null
+++ b/include/vcl/pdf/PDFAnnotationMarker.hxx
@@ -0,0 +1,77 @@
+/* -*- 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/.
+ *
+ */
+
+#pragma once
+
+#include <vcl/dllapi.h>
+#include <tools/color.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+
+namespace vcl::pdf
+{
+struct VCL_DLLPUBLIC PDFAnnotationMarker
+{
+ PDFAnnotationMarker()
+ : mnWidth(0.0f)
+ , maFillColor(COL_TRANSPARENT)
+ {
+ }
+
+ float mnWidth;
+ Color maFillColor;
+};
+
+struct VCL_DLLPUBLIC PDFAnnotationMarkerCircle : public PDFAnnotationMarker
+{
+};
+
+struct VCL_DLLPUBLIC PDFAnnotationMarkerSquare : public PDFAnnotationMarker
+{
+};
+
+struct VCL_DLLPUBLIC PDFAnnotationMarkerInk : public PDFAnnotationMarker
+{
+ std::vector<basegfx::B2DPolygon> maStrokes;
+};
+
+struct VCL_DLLPUBLIC PDFAnnotationMarkerPolygon : public PDFAnnotationMarker
+{
+ basegfx::B2DPolygon maPolygon;
+};
+
+struct VCL_DLLPUBLIC PDFAnnotationMarkerLine : public PDFAnnotationMarker
+{
+ basegfx::B2DPoint maLineStart;
+ basegfx::B2DPoint maLineEnd;
+};
+
+enum class PDFTextMarkerType
+{
+ Highlight,
+ Underline,
+ Squiggly,
+ StrikeOut
+};
+
+struct VCL_DLLPUBLIC PDFAnnotationMarkerHighlight : public PDFAnnotationMarker
+{
+ std::vector<basegfx::B2DPolygon> maQuads;
+ PDFTextMarkerType meTextMarkerType;
+
+ PDFAnnotationMarkerHighlight(PDFTextMarkerType eTextMarkerType)
+ : meTextMarkerType(eTextMarkerType)
+ {
+ }
+};
+
+} // namespace vcl::pdf
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */