Update git submodules
[LibreOffice.git] / filter / source / graphicfilter / icgm / elements.hxx
blob3f4bd710a4f2ce6cac4bb342e86db3f8f7f369ea
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 .
19 #pragma once
21 #include "bundles.hxx"
22 #include "cgmtypes.hxx"
23 #include <vector>
24 #include <map>
26 #define nBackGroundColor aColorTable[ 0 ]
28 typedef ::std::vector< std::unique_ptr<Bundle> > BundleList;
30 class CGMElements
32 void ImplInsertHatch( sal_Int32 Key, int Style, tools::Long Distance, tools::Long Angle );
33 public:
34 tools::Long nMetaFileVersion;
36 sal_uInt32 nIntegerPrecision; // maybe 1, 2, 4 Bytes
37 sal_uInt32 nIndexPrecision; // " " "
38 RealPrecision eRealPrecision;
39 sal_uInt32 nRealSize; // maybe 4 or 8 bytes
40 sal_uInt32 nColorPrecision; // " " "
41 sal_uInt32 nColorIndexPrecision;// " " "
43 ScalingMode eScalingMode;
44 double nScalingFactor;
46 VDCType eVDCType; // Integer / Real
47 sal_uInt32 nVDCIntegerPrecision;
48 RealPrecision eVDCRealPrecision;
49 sal_uInt32 nVDCRealSize;
50 FloatRect aVDCExtent;
51 FloatRect aVDCExtentMaximum;
53 DeviceViewPortMode eDeviceViewPortMode;
54 double nDeviceViewPortScale;
55 DeviceViewPortMap eDeviceViewPortMap;
56 DeviceViewPortMapH eDeviceViewPortMapH;
57 DeviceViewPortMapV eDeviceViewPortMapV;
58 FloatRect aDeviceViewPort;
60 double nMitreLimit;
62 ClipIndicator eClipIndicator;
63 FloatRect aClipRect;
65 ColorSelectionMode eColorSelectionMode;
66 sal_uInt32 nColorMaximumIndex; // default 63
67 sal_uInt32 nLatestColorMaximumIndex; // default 63
68 sal_Int8 aColorTableEntryIs[ 256 ];
69 sal_uInt32 aColorTable[ 256 ];
70 sal_uInt32 aLatestColorTable[ 256 ];
71 sal_uInt32 nColorValueExtent[ 8 ]; // RGB, CMYK
73 // ASPECT SOURCE FLAGS
74 sal_uInt32 nAspectSourceFlags; // bit = 0 -> INDIVIDUAL
75 // 1 -> BUNDLED
77 LineBundle* pLineBundle; // Pointer to the current LineBundleIndex
78 LineBundle aLineBundle;
79 BundleList aLineList;
80 SpecMode eLineWidthSpecMode;
81 LineCapType eLineCapType;
82 LineJoinType eLineJoinType;
84 MarkerBundle* pMarkerBundle; // Pointer to the current MarkerBundleIndex
85 MarkerBundle aMarkerBundle;
86 BundleList aMarkerList;
87 SpecMode eMarkerSizeSpecMode;
89 EdgeBundle* pEdgeBundle; // Pointer to the current EdgeBundleIndex
90 EdgeBundle aEdgeBundle;
91 BundleList aEdgeList;
92 EdgeVisibility eEdgeVisibility;
93 SpecMode eEdgeWidthSpecMode;
95 TextBundle* pTextBundle; // Pointer to the current TextBundleIndex
96 TextBundle aTextBundle;
97 BundleList aTextList;
98 double nCharacterHeight;
99 double nCharacterOrientation[ 4 ];
100 UnderlineMode eUnderlineMode;
101 sal_uInt32 nUnderlineColor;
102 TextPath eTextPath;
103 TextAlignmentH eTextAlignmentH;
104 TextAlignmentV eTextAlignmentV;
105 double nTextAlignmentHCont;
106 double nTextAlignmentVCont;
107 tools::Long nCharacterSetIndex;
108 tools::Long nAlternateCharacterSetIndex;
109 CharacterCodingA eCharacterCodingA;
110 CGMFList aFontList;
112 FillBundle* pFillBundle; // Pointer to the current EdgeBundleIndex
113 FillBundle aFillBundle;
114 BundleList aFillList;
115 FloatPoint aFillRefPoint;
116 ::std::map<sal_uInt32, HatchEntry>
117 maHatchMap;
119 Transparency eTransparency;
121 sal_uInt32 nAuxiliaryColor;
123 // Delimiter Counts -> which will be increased by each 'begin' operation
124 // and decreased by each 'end' operation
125 bool bSegmentCount;
126 explicit CGMElements();
127 ~CGMElements();
128 CGMElements& operator=( const CGMElements& );
129 void Init();
130 static Bundle* GetBundleIndex( tools::Long nIndex, BundleList&, Bundle& );
131 static Bundle* GetBundle( BundleList& rList, tools::Long nIndex );
132 static Bundle* InsertBundle( BundleList&, Bundle& );
133 static void CopyAllBundles( const BundleList& Source, BundleList& Dest );
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */