1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
21 #include "bundles.hxx"
22 #include "cgmtypes.hxx"
26 #define nBackGroundColor aColorTable[ 0 ]
28 typedef ::std::vector
< std::unique_ptr
<Bundle
> > BundleList
;
32 void ImplInsertHatch( sal_Int32 Key
, int Style
, tools::Long Distance
, tools::Long Angle
);
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
;
51 FloatRect aVDCExtentMaximum
;
53 DeviceViewPortMode eDeviceViewPortMode
;
54 double nDeviceViewPortScale
;
55 DeviceViewPortMap eDeviceViewPortMap
;
56 DeviceViewPortMapH eDeviceViewPortMapH
;
57 DeviceViewPortMapV eDeviceViewPortMapV
;
58 FloatRect aDeviceViewPort
;
62 ClipIndicator eClipIndicator
;
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
77 LineBundle
* pLineBundle
; // Pointer to the current LineBundleIndex
78 LineBundle aLineBundle
;
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
;
92 EdgeVisibility eEdgeVisibility
;
93 SpecMode eEdgeWidthSpecMode
;
95 TextBundle
* pTextBundle
; // Pointer to the current TextBundleIndex
96 TextBundle aTextBundle
;
98 double nCharacterHeight
;
99 double nCharacterOrientation
[ 4 ];
100 UnderlineMode eUnderlineMode
;
101 sal_uInt32 nUnderlineColor
;
103 TextAlignmentH eTextAlignmentH
;
104 TextAlignmentV eTextAlignmentV
;
105 double nTextAlignmentHCont
;
106 double nTextAlignmentVCont
;
107 tools::Long nCharacterSetIndex
;
108 tools::Long nAlternateCharacterSetIndex
;
109 CharacterCodingA eCharacterCodingA
;
112 FillBundle
* pFillBundle
; // Pointer to the current EdgeBundleIndex
113 FillBundle aFillBundle
;
114 BundleList aFillList
;
115 FloatPoint aFillRefPoint
;
116 ::std::map
<sal_uInt32
, HatchEntry
>
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
126 explicit CGMElements();
128 CGMElements
& operator=( const CGMElements
& );
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: */