blob: c4be54d6931831b272e8287cec7735cc2c42610d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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: */
|