CDRStylesCollector.h Source File documentation

CDRStylesCollector.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libcdr 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
10 #ifndef __CDRSTYLESCOLLECTOR_H__
11 #define __CDRSTYLESCOLLECTOR_H__
12
13 #include <map>
14 #include <vector>
15 #include <stack>
16 #include <librevenge/librevenge.h>
17 #include <lcms2.h>
18 #include "CDRTypes.h"
19 #include "CDRPath.h"
20 #include "CDROutputElementList.h"
21 #include "CDRCollector.h"
22 #include "libcdr_utils.h"
23
24 namespace libcdr
25 {
26
27 class CDRStylesCollector : public CDRCollector
28 {
29 public:
30 CDRStylesCollector(CDRParserState &ps);
31 virtual ~CDRStylesCollector();
32
33 // collector functions
34 void collectPage(unsigned level);
35 void collectObject(unsigned) {}
36 void collectGroup(unsigned) {}
37 void collectVect(unsigned) {}
38 void collectOtherList() {}
39 void collectPath(const CDRPath &) {}
40 void collectLevel(unsigned) {}
41 void collectTransform(const CDRTransforms &, bool) {}
42 void collectFillStyle(unsigned id, const CDRFillStyle &fillStyle);
43 void collectFillStyleId(unsigned) {}
44 void collectLineStyle(unsigned id, const CDRLineStyle &lineStyle);
45 void collectLineStyleId(unsigned) {}
46 void collectRotate(double,double,double) {}
47 void collectFlags(unsigned, bool) {}
48 void collectPageSize(double width, double height, double offsetX, double offsetY);
49 void collectPolygonTransform(unsigned, unsigned, double, double, double, double) {}
50 void collectBitmap(unsigned, double, double, double, double) {}
51 void collectBmp(unsigned imageId, unsigned colorModel, unsigned width, unsigned height, unsigned bpp, const std::vector<unsigned> &palette, const std::vector<unsigned char> &bitmap);
52 void collectBmp(unsigned imageId, const std::vector<unsigned char> &bitmap);
53 void collectBmpf(unsigned patternId, unsigned width, unsigned height, const std::vector<unsigned char> &pattern);
54 void collectPpdt(const std::vector<std::pair<double, double> > &, const std::vector<unsigned> &) {}
55 void collectFillTransform(const CDRTransforms &) {}
56 void collectFillOpacity(double) {}
57 void collectPolygon() {}
58 void collectSpline() {}
59 void collectColorProfile(const std::vector<unsigned char> &profile);
60 void collectBBox(double, double, double, double) {}
61 void collectSpnd(unsigned) {}
62 void collectVectorPattern(unsigned, const librevenge::RVNGBinaryData &) {}
63 void collectPaletteEntry(unsigned colorId, unsigned userId, const CDRColor &color);
64 void collectText(unsigned textId, unsigned styleId, const std::vector<unsigned char> &data,
65 const std::vector<unsigned char> &charDescriptions, const std::map<unsigned, CDRStyle> &styleOverrides);
66 void collectArtisticText(double, double) {}
67 void collectParagraphText(double, double, double, double) {}
68 void collectStld(unsigned id, const CDRStyle &style);
69 void collectStyleId(unsigned) {}
70
71 private:
72 CDRStylesCollector(const CDRStylesCollector &);
73 CDRStylesCollector &operator=(const CDRStylesCollector &);
74
75 CDRParserState &m_ps;
76 CDRPage m_page;
77 };
78
79 } // namespace libcdr
80
81 #endif /* __CDRCOLLECTOR_H__ */
82 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libcdr::CDRStylesCollector::~CDRStylesCollector
virtual ~CDRStylesCollector()
Definition: CDRStylesCollector.cpp:30
libcdr::CDRStylesCollector::collectBmp
void collectBmp(unsigned imageId, unsigned colorModel, unsigned width, unsigned height, unsigned bpp, const std::vector< unsigned > &palette, const std::vector< unsigned char > &bitmap)
Definition: CDRStylesCollector.cpp:34
libcdr::CDRStylesCollector::collectGroup
void collectGroup(unsigned)
Definition: CDRStylesCollector.h:36
libcdr::CDRStylesCollector::collectFillStyleId
void collectFillStyleId(unsigned)
Definition: CDRStylesCollector.h:43
libcdr::CDRPath
Definition: CDRPath.h:34
libcdr::CDRStylesCollector::collectPath
void collectPath(const CDRPath &)
Definition: CDRStylesCollector.h:39
libcdr::CDRStylesCollector::collectArtisticText
void collectArtisticText(double, double)
Definition: CDRStylesCollector.h:66
libcdr::CDRPage
Definition: CDRTypes.h:238
libcdr::CDRStylesCollector::collectPaletteEntry
void collectPaletteEntry(unsigned colorId, unsigned userId, const CDRColor &color)
Definition: CDRStylesCollector.cpp:208
libcdr::CDRStylesCollector::m_page
CDRPage m_page
Definition: CDRStylesCollector.h:76
libcdr::CDRStylesCollector::collectBmpf
void collectBmpf(unsigned patternId, unsigned width, unsigned height, const std::vector< unsigned char > &pattern)
Definition: CDRStylesCollector.cpp:197
libcdr::CDRStylesCollector::collectTransform
void collectTransform(const CDRTransforms &, bool)
Definition: CDRStylesCollector.h:41
libcdr::CDRStylesCollector::collectLineStyleId
void collectLineStyleId(unsigned)
Definition: CDRStylesCollector.h:45
libcdr::CDRFillStyle
Definition: CDRTypes.h:100
libcdr::CDRStylesCollector::collectFillStyle
void collectFillStyle(unsigned id, const CDRFillStyle &fillStyle)
Definition: CDRStylesCollector.cpp:272
libcdr::CDRStylesCollector::collectPolygon
void collectPolygon()
Definition: CDRStylesCollector.h:57
libcdr::CDRStylesCollector::collectBBox
void collectBBox(double, double, double, double)
Definition: CDRStylesCollector.h:60
libcdr::CDRStylesCollector::collectOtherList
void collectOtherList()
Definition: CDRStylesCollector.h:38
libcdr::CDRStylesCollector::collectObject
void collectObject(unsigned)
Definition: CDRStylesCollector.h:35
libcdr::CDRStylesCollector::collectPageSize
void collectPageSize(double width, double height, double offsetX, double offsetY)
Definition: CDRStylesCollector.cpp:184
libcdr_utils.h
libcdr::CDRStylesCollector::collectLineStyle
void collectLineStyle(unsigned id, const CDRLineStyle &lineStyle)
Definition: CDRStylesCollector.cpp:277
libcdr::CDRStylesCollector::collectRotate
void collectRotate(double, double, double)
Definition: CDRStylesCollector.h:46
libcdr
Definition: CDRCollector.h:29
libcdr::CDRStylesCollector::collectPpdt
void collectPpdt(const std::vector< std::pair< double, double > > &, const std::vector< unsigned > &)
Definition: CDRStylesCollector.h:54
libcdr::CDRStylesCollector::collectVectorPattern
void collectVectorPattern(unsigned, const librevenge::RVNGBinaryData &)
Definition: CDRStylesCollector.h:62
CDROutputElementList.h
libcdr::CDRStylesCollector
Definition: CDRStylesCollector.h:27
libcdr::CDRStylesCollector::CDRStylesCollector
CDRStylesCollector(CDRParserState &ps)
Definition: CDRStylesCollector.cpp:25
libcdr::CDRStylesCollector::collectPage
void collectPage(unsigned level)
Definition: CDRStylesCollector.cpp:192
libcdr::CDRStylesCollector::collectLevel
void collectLevel(unsigned)
Definition: CDRStylesCollector.h:40
libcdr::CDRStylesCollector::operator=
CDRStylesCollector & operator=(const CDRStylesCollector &)
libcdr::CDRStylesCollector::collectVect
void collectVect(unsigned)
Definition: CDRStylesCollector.h:37
libcdr::CDRStylesCollector::collectPolygonTransform
void collectPolygonTransform(unsigned, unsigned, double, double, double, double)
Definition: CDRStylesCollector.h:49
libcdr::CDRStylesCollector::collectBitmap
void collectBitmap(unsigned, double, double, double, double)
Definition: CDRStylesCollector.h:50
libcdr::CDRStylesCollector::collectSpline
void collectSpline()
Definition: CDRStylesCollector.h:58
libcdr::CDRStylesCollector::m_ps
CDRParserState & m_ps
Definition: CDRStylesCollector.h:75
libcdr::CDRStylesCollector::collectStyleId
void collectStyleId(unsigned)
Definition: CDRStylesCollector.h:69
libcdr::CDRStylesCollector::collectFillTransform
void collectFillTransform(const CDRTransforms &)
Definition: CDRStylesCollector.h:55
CDRCollector.h
CDRTypes.h
libcdr::CDRLineStyle
Definition: CDRTypes.h:112
libcdr::CDRParserState
Definition: CDRCollector.h:32
libcdr::CDRColor
Definition: CDRTypes.h:52
libcdr::CDRStylesCollector::collectFlags
void collectFlags(unsigned, bool)
Definition: CDRStylesCollector.h:47
libcdr::CDRStylesCollector::collectColorProfile
void collectColorProfile(const std::vector< unsigned char > &profile)
Definition: CDRStylesCollector.cpp:202
libcdr::CDRStylesCollector::collectStld
void collectStld(unsigned id, const CDRStyle &style)
Definition: CDRStylesCollector.cpp:267
libcdr::CDRStylesCollector::collectSpnd
void collectSpnd(unsigned)
Definition: CDRStylesCollector.h:61
CDRPath.h
libcdr::CDRStyle
Definition: CDRTypes.h:136
libcdr::CDRStylesCollector::collectParagraphText
void collectParagraphText(double, double, double, double)
Definition: CDRStylesCollector.h:67
libcdr::CDRTransforms
Definition: CDRTransforms.h:50
libcdr::CDRCollector
Definition: CDRCollector.h:63
libcdr::CDRStylesCollector::collectFillOpacity
void collectFillOpacity(double)
Definition: CDRStylesCollector.h:56
libcdr::CDRStylesCollector::collectText
void collectText(unsigned textId, unsigned styleId, const std::vector< unsigned char > &data, const std::vector< unsigned char > &charDescriptions, const std::map< unsigned, CDRStyle > &styleOverrides)
Definition: CDRStylesCollector.cpp:213