calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / drawinglayer / source / tools / emfppen.hxx
blob31812c8b0c0ee94972628885899d9b1245537507
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 #pragma once
22 #include <drawinglayer/attribute/strokeattribute.hxx>
23 #include "emfpbrush.hxx"
24 #include <vector>
26 namespace emfplushelper
28 const sal_uInt32 EmfPlusLineCapTypeSquare = 0x00000001;
29 const sal_uInt32 EmfPlusLineCapTypeRound = 0x00000002;
30 const sal_uInt32 EmfPlusLineCapTypeTriangle = 0x00000003;
32 const sal_uInt32 EmfPlusLineJoinTypeMiter = 0x00000000;
33 const sal_uInt32 EmfPlusLineJoinTypeBevel = 0x00000001;
34 const sal_uInt32 EmfPlusLineJoinTypeRound = 0x00000002;
35 const sal_uInt32 EmfPlusLineJoinTypeMiterClipped = 0x00000003;
37 const sal_Int32 EmfPlusLineStyleSolid = 0x00000000;
38 const sal_Int32 EmfPlusLineStyleDash = 0x00000001;
39 const sal_Int32 EmfPlusLineStyleDot = 0x00000002;
40 const sal_Int32 EmfPlusLineStyleDashDot = 0x00000003;
41 const sal_Int32 EmfPlusLineStyleDashDotDot = 0x00000004;
42 const sal_Int32 EmfPlusLineStyleCustom = 0x00000005;
44 const sal_uInt32 EmfPlusPenDataTransform = 0x00000001;
45 const sal_uInt32 EmfPlusPenDataStartCap = 0x00000002;
46 const sal_uInt32 EmfPlusPenDataEndCap = 0x00000004;
47 const sal_uInt32 EmfPlusPenDataJoin = 0x00000008;
48 const sal_uInt32 EmfPlusPenDataMiterLimit = 0x00000010;
49 const sal_uInt32 EmfPlusPenDataLineStyle = 0x00000020;
50 const sal_uInt32 EmfPlusPenDataDashedLineCap = 0x00000040;
51 const sal_uInt32 EmfPlusPenDataDashedLineOffset = 0x00000080;
52 const sal_uInt32 EmfPlusPenDataDashedLine = 0x00000100;
53 const sal_uInt32 EmfPlusPenDataAlignment = 0x00000200;
54 const sal_uInt32 EmfPlusPenDataCompoundLine = 0x00000400;
55 const sal_uInt32 EmfPlusPenDataCustomStartCap = 0x00000800;
56 const sal_uInt32 EmfPlusPenDataCustomEndCap = 0x000001000;
58 enum LineCapType
60 LineCapTypeFlat = 0x00000000,
61 LineCapTypeSquare = 0x00000001,
62 LineCapTypeRound = 0x00000002,
63 LineCapTypeTriangle = 0x00000003,
64 LineCapTypeNoAnchor = 0x00000010,
65 LineCapTypeSquareAnchor = 0x00000011,
66 LineCapTypeRoundAnchor = 0x00000012,
67 LineCapTypeDiamondAnchor = 0x00000013,
68 LineCapTypeArrowAnchor = 0x00000014,
69 LineCapTypeAnchorMask = 0x000000F0,
70 LineCapTypeCustom = 0x000000FF
73 enum LineJoinType
75 LineJoinTypeMiter = 0x00000000,
76 LineJoinTypeBevel = 0x00000001,
77 LineJoinTypeRound = 0x00000002,
78 LineJoinTypeMiterClipped = 0x00000003
81 enum DashedLineCapType
83 DashedLineCapTypeFlat = 0x00000000,
84 DashedLineCapTypeRound = 0x00000002,
85 DashedLineCapTypeTriangle = 0x00000003
88 enum PenAlignment
90 PenAlignmentCenter = 0x00000000,
91 PenAlignmentInset = 0x00000001,
92 PenAlignmentLeft = 0x00000002,
93 PenAlignmentOutset = 0x00000003,
94 PenAlignmentRight = 0x00000004
97 struct EMFPCustomLineCap;
99 struct EMFPPen : public EMFPBrush
101 basegfx::B2DHomMatrix pen_transformation; //TODO: This isn't used
102 sal_uInt32 penDataFlags;
103 sal_uInt32 penUnit;
104 float penWidth;
105 sal_Int32 startCap;
106 sal_Int32 endCap;
107 basegfx::B2DLineJoin maLineJoin;
108 double fMiterMinimumAngle;
109 sal_Int32 dashStyle;
110 sal_Int32 dashCap;
111 float dashOffset;
112 std::vector<float> dashPattern;
113 sal_Int32 alignment;
114 std::vector<float> compoundArray;
115 sal_uInt32 customStartCapLen;
116 std::unique_ptr<EMFPCustomLineCap> customStartCap;
117 sal_uInt32 customEndCapLen;
118 std::unique_ptr<EMFPCustomLineCap> customEndCap;
120 EMFPPen();
122 virtual ~EMFPPen() override;
124 void Read(SvStream& s, EmfPlusHelperData const & rR);
126 drawinglayer::attribute::StrokeAttribute GetStrokeAttribute(const double aTransformation) const;
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */