Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef CGM_BUNDLES_HXX_
21 : #define CGM_BUNDLES_HXX_
22 :
23 : #include <sal/types.h>
24 : #include "cgmtypes.hxx"
25 : #include <vcl/salbtype.hxx>
26 : #include <vector>
27 :
28 : // ---------------------------------------------------------------
29 :
30 0 : class Bundle
31 : {
32 :
33 : long mnBundleIndex;
34 : sal_uInt32 mnColor;
35 :
36 : public:
37 : void SetColor( sal_uInt32 nColor ) ;
38 : sal_uInt32 GetColor() const;
39 0 : long GetIndex() const { return mnBundleIndex; } ;
40 0 : void SetIndex( long nBundleIndex ) { mnBundleIndex = nBundleIndex; } ;
41 :
42 0 : Bundle() {};
43 0 : virtual Bundle* Clone() { return new Bundle( *this ); };
44 : Bundle& operator=( Bundle& rBundle );
45 :
46 0 : virtual ~Bundle() {} ;
47 : };
48 :
49 : // ---------------------------------------------------------------
50 :
51 0 : class LineBundle : public Bundle
52 : {
53 : public:
54 :
55 : LineType eLineType;
56 : double nLineWidth;
57 :
58 0 : LineBundle() {};
59 0 : virtual Bundle* Clone() { return new LineBundle( *this ); };
60 : LineBundle& operator=( LineBundle& rLineBundle );
61 0 : virtual ~LineBundle() {};
62 : };
63 :
64 : // ---------------------------------------------------------------
65 :
66 0 : class MarkerBundle : public Bundle
67 : {
68 : public:
69 :
70 : MarkerType eMarkerType;
71 : double nMarkerSize;
72 :
73 0 : MarkerBundle() {};
74 0 : virtual Bundle* Clone() { return new MarkerBundle( *this ); } ;
75 : MarkerBundle& operator=( MarkerBundle& rMarkerBundle );
76 0 : virtual ~MarkerBundle() {};
77 : };
78 :
79 : // ---------------------------------------------------------------
80 :
81 0 : class EdgeBundle : public Bundle
82 : {
83 : public:
84 :
85 : EdgeType eEdgeType;
86 : double nEdgeWidth;
87 :
88 0 : EdgeBundle() {};
89 0 : virtual Bundle* Clone() { return new EdgeBundle( *this ); } ;
90 : EdgeBundle& operator=( EdgeBundle& rEdgeBundle );
91 0 : virtual ~EdgeBundle() {};
92 : };
93 :
94 : // ---------------------------------------------------------------
95 :
96 0 : class TextBundle : public Bundle
97 : {
98 : public:
99 :
100 : sal_uInt32 nTextFontIndex;
101 : TextPrecision eTextPrecision;
102 : double nCharacterExpansion;
103 : double nCharacterSpacing;
104 :
105 0 : TextBundle() {};
106 0 : virtual Bundle* Clone() { return new TextBundle( *this ); } ;
107 : TextBundle& operator=( TextBundle& rTextBundle );
108 0 : virtual ~TextBundle() {};
109 : };
110 :
111 : // ---------------------------------------------------------------
112 :
113 0 : class FillBundle : public Bundle
114 : {
115 : public:
116 :
117 : FillInteriorStyle eFillInteriorStyle;
118 : long nFillPatternIndex;
119 : long nFillHatchIndex;
120 :
121 0 : FillBundle() {};
122 0 : virtual Bundle* Clone() { return new FillBundle( *this ); } ;
123 : FillBundle& operator=( FillBundle& rFillBundle );
124 0 : virtual ~FillBundle() {};
125 : };
126 :
127 :
128 : // ---------------------------------------------------------------
129 :
130 : class FontEntry
131 : {
132 : public:
133 : sal_Int8* pFontName;
134 : CharSetType eCharSetType;
135 : sal_Int8* pCharSetValue;
136 : sal_uInt32 nFontType; // bit 0 = 1 -> Italic,
137 : // bit 1 = 1 -> Bold
138 :
139 : FontEntry();
140 : FontEntry* Clone() { return new FontEntry( *this ); } ;
141 : ~FontEntry();
142 : };
143 :
144 : // ---------------------------------------------------------------
145 :
146 : typedef ::std::vector< FontEntry* > FontEntryList;
147 :
148 : class CGMFList
149 : {
150 : sal_uInt32 nFontNameCount;
151 : sal_uInt32 nCharSetCount;
152 : FontEntryList aFontEntryList;
153 : void ImplDeleteList();
154 :
155 : public:
156 : CGMFList();
157 : ~CGMFList();
158 :
159 : sal_uInt32 nFontsAvailable;
160 : FontEntry* GetFontEntry( sal_uInt32 );
161 : void InsertName( sal_uInt8* pSource, sal_uInt32 nSize );
162 : void InsertCharSet( CharSetType, sal_uInt8* pSource, sal_uInt32 nSize );
163 : CGMFList& operator=( CGMFList& rFontList );
164 : };
165 :
166 : #endif
167 :
168 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|