CDRStylesCollector.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* libcdr
3  * Version: MPL 1.1 / GPLv2+ / LGPLv2+
4  *
5  * The contents of this file are subject to the Mozilla Public License Version
6  * 1.1 (the "License"); you may not use this file except in compliance with
7  * the License or as specified alternatively below. You may obtain a copy of
8  * the License at http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12  * for the specific language governing rights and limitations under the
13  * License.
14  *
15  * Major Contributor(s):
16  * Copyright (C) 2012 Fridrich Strba <fridrich.strba@bluewin.ch>
17  *
18  *
19  * All Rights Reserved.
20  *
21  * For minor contributions see the git repository.
22  *
23  * Alternatively, the contents of this file may be used under the terms of
24  * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
25  * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
26  * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
27  * instead of those above.
28  */
29 
30 #ifndef __CDRSTYLESCOLLECTOR_H__
31 #define __CDRSTYLESCOLLECTOR_H__
32 
33 #include <map>
34 #include <vector>
35 #include <stack>
36 #include <libwpg/libwpg.h>
37 #include <lcms2.h>
38 #include "CDRTypes.h"
39 #include "CDRPath.h"
40 #include "CDROutputElementList.h"
41 #include "CDRCollector.h"
42 #include "libcdr_utils.h"
43 
44 namespace libcdr
45 {
46 
48 {
49 public:
51  virtual ~CDRStylesCollector();
52 
53  // collector functions
54  void collectPage(unsigned level);
55  void collectObject(unsigned) {}
56  void collectGroup(unsigned) {}
57  void collectVect(unsigned) {}
58  void collectOtherList() {}
59  void collectCubicBezier(double, double, double, double, double, double) {}
60  void collectQuadraticBezier(double, double, double, double) {}
61  void collectMoveTo(double, double) {}
62  void collectLineTo(double, double) {}
63  void collectArcTo(double, double, bool, bool, double, double) {}
64  void collectClosePath() {}
65  void collectLevel(unsigned) {}
66  void collectTransform(const CDRTransforms &, bool) {}
67  void collectFillStyle(unsigned short, const CDRColor &, const CDRColor &, const CDRGradient &, const CDRImageFill &) {}
68  void collectLineStyle(unsigned short, unsigned short, unsigned short, double, double, double, const CDRColor &,
69  const std::vector<unsigned> &, unsigned, unsigned) {}
70  void collectRotate(double,double,double) {}
71  void collectFlags(unsigned, bool) {}
72  void collectPageSize(double width, double height, double offsetX, double offsetY);
73  void collectPolygonTransform(unsigned, unsigned, double, double, double, double) {}
74  void collectBitmap(unsigned, double, double, double, double) {}
75  void collectBmp(unsigned imageId, unsigned colorModel, unsigned width, unsigned height, unsigned bpp, const std::vector<unsigned> &palette, const std::vector<unsigned char> &bitmap);
76  void collectBmp(unsigned imageId, const std::vector<unsigned char> &bitmap);
77  void collectBmpf(unsigned patternId, unsigned width, unsigned height, const std::vector<unsigned char> &pattern);
78  void collectPpdt(const std::vector<std::pair<double, double> > &, const std::vector<unsigned> &) {}
80  void collectFillOpacity(double) {}
81  void collectPolygon() {}
82  void collectSpline() {}
83  void collectColorProfile(const std::vector<unsigned char> &profile);
84  void collectBBox(double, double, double, double) {}
85  void collectSpnd(unsigned) {}
86  void collectVectorPattern(unsigned, const WPXBinaryData &) {}
87  void collectPaletteEntry(unsigned colorId, unsigned userId, const CDRColor &color);
88  void collectText(unsigned textId, unsigned styleId, const std::vector<unsigned char> &data,
89  const std::vector<unsigned char> &charDescriptions, const std::map<unsigned, CDRCharacterStyle> &styleOverrides);
90  void collectArtisticText(double, double) {}
91  void collectParagraphText(double, double, double, double) {}
92  void collectStld(unsigned id, const CDRCharacterStyle &charStyle);
93 
94 private:
97 
98  void getRecursedStyle(CDRCharacterStyle &charStyle, unsigned styleId);
99 
102  std::map<unsigned, CDRCharacterStyle> m_charStyles;
103 };
104 
105 } // namespace libcdr
106 
107 #endif /* __CDRCOLLECTOR_H__ */
108 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */

Generated for libcdr by doxygen 1.8.1.2