- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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
43 namespace libcdr
44 {
45
46 class CDRStylesCollector : public CDRCollector
47 {
48 public:
49 CDRStylesCollector(CDRParserState &ps);
50 virtual ~CDRStylesCollector();
51
52 // collector functions
53 void collectPage(unsigned) {}
54 void collectObject(unsigned) {}
55 void collectOtherList() {}
56 void collectCubicBezier(double, double, double, double, double, double) {}
57 void collectQuadraticBezier(double, double, double, double) {}
58 void collectMoveTo(double, double) {}
59 void collectLineTo(double, double) {}
60 void collectArcTo(double, double, bool, bool, double, double) {}
61 void collectClosePath() {}
62 void collectLevel(unsigned) {}
63 void collectTransform(double, double, double, double, double, double) {}
64 void collectFildId(unsigned) {}
65 void collectOutlId(unsigned) {}
66 void collectFild(unsigned id, unsigned short fillType, const CDRColor &color1, const CDRColor &color2, const CDRGradient &gradient, const CDRImageFill &imageFill);
67 void collectOutl(unsigned id, unsigned short lineType, unsigned short capsType, unsigned short joinType, double lineWidth,
68 double stretch, double angle, const CDRColor &color, const std::vector<unsigned short> &dashArray,
69 unsigned startMarkerId, unsigned endMarkerId);
70 void collectRotate(double) {}
71 void collectFlags(unsigned) {}
72 void collectPageSize(double, double) {}
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 collectBmpf(unsigned patternId, unsigned width, unsigned height, const std::vector<unsigned char> &pattern);
77 void collectPpdt(const std::vector<std::pair<double, double> > &, const std::vector<unsigned> &) {}
78 void collectFillTransform(double, double, double, double, double, double) {}
79 void collectFillOpacity(double) {}
80 void collectPolygon() {}
81 void collectSpline() {}
82
83 private:
84 CDRStylesCollector(const CDRStylesCollector &);
85 CDRStylesCollector &operator=(const CDRStylesCollector &);
86
87 // helper functions
88 CDRParserState &m_ps;
89 };
90
91 } // namespace libcdr
92
93 #endif /* __CDRCOLLECTOR_H__ */
94 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libcdr::CDRStylesCollector::~CDRStylesCollector
virtual ~CDRStylesCollector()
Definition: CDRStylesCollector.cpp:52
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:69
libcdr::CDRStylesCollector::collectCubicBezier
void collectCubicBezier(double, double, double, double, double, double)
Definition: CDRStylesCollector.h:56
libcdr::CDRStylesCollector::collectPage
void collectPage(unsigned)
Definition: CDRStylesCollector.h:53
libcdr::CDRImageFill
Definition: CDRTypes.h:98
libcdr::CDRStylesCollector::collectBmpf
void collectBmpf(unsigned patternId, unsigned width, unsigned height, const std::vector< unsigned char > &pattern)
Definition: CDRStylesCollector.cpp:198
libcdr::CDRStylesCollector::collectOutl
void collectOutl(unsigned id, unsigned short lineType, unsigned short capsType, unsigned short joinType, double lineWidth, double stretch, double angle, const CDRColor &color, const std::vector< unsigned short > &dashArray, unsigned startMarkerId, unsigned endMarkerId)
Definition: CDRStylesCollector.cpp:62
libcdr::CDRStylesCollector::collectClosePath
void collectClosePath()
Definition: CDRStylesCollector.h:61
libcdr::CDRStylesCollector::collectPolygon
void collectPolygon()
Definition: CDRStylesCollector.h:80
libcdr::CDRStylesCollector::collectRotate
void collectRotate(double)
Definition: CDRStylesCollector.h:70
libcdr::CDRStylesCollector::collectOtherList
void collectOtherList()
Definition: CDRStylesCollector.h:55
libcdr::CDRStylesCollector::collectObject
void collectObject(unsigned)
Definition: CDRStylesCollector.h:54
libcdr::CDRStylesCollector::collectMoveTo
void collectMoveTo(double, double)
Definition: CDRStylesCollector.h:58
libcdr::CDRStylesCollector::collectArcTo
void collectArcTo(double, double, bool, bool, double, double)
Definition: CDRStylesCollector.h:60
libcdr::CDRStylesCollector::collectPpdt
void collectPpdt(const std::vector< std::pair< double, double > > &, const std::vector< unsigned > &)
Definition: CDRStylesCollector.h:77
libcdr::CDRStylesCollector::collectFillTransform
void collectFillTransform(double, double, double, double, double, double)
Definition: CDRStylesCollector.h:78
CDROutputElementList.h
libcdr::CDRStylesCollector
Definition: CDRStylesCollector.h:46
libcdr::CDRStylesCollector::CDRStylesCollector
CDRStylesCollector(CDRParserState &ps)
Definition: CDRStylesCollector.cpp:47
libcdr::CDRStylesCollector::collectQuadraticBezier
void collectQuadraticBezier(double, double, double, double)
Definition: CDRStylesCollector.h:57
libcdr::CDRStylesCollector::collectFlags
void collectFlags(unsigned)
Definition: CDRStylesCollector.h:71
libcdr::CDRStylesCollector::collectLevel
void collectLevel(unsigned)
Definition: CDRStylesCollector.h:62
libcdr::CDRStylesCollector::collectTransform
void collectTransform(double, double, double, double, double, double)
Definition: CDRStylesCollector.h:63
libcdr::CDRStylesCollector::operator=
CDRStylesCollector & operator=(const CDRStylesCollector &)
libcdr::CDRStylesCollector::collectPolygonTransform
void collectPolygonTransform(unsigned, unsigned, double, double, double, double)
Definition: CDRStylesCollector.h:73
libcdr::CDRStylesCollector::collectLineTo
void collectLineTo(double, double)
Definition: CDRStylesCollector.h:59
libcdr::CDRStylesCollector::collectFild
void collectFild(unsigned id, unsigned short fillType, const CDRColor &color1, const CDRColor &color2, const CDRGradient &gradient, const CDRImageFill &imageFill)
Definition: CDRStylesCollector.cpp:56
libcdr::CDRStylesCollector::collectBitmap
void collectBitmap(unsigned, double, double, double, double)
Definition: CDRStylesCollector.h:74
libcdr::CDRStylesCollector::collectSpline
void collectSpline()
Definition: CDRStylesCollector.h:81
libcdr::CDRStylesCollector::m_ps
CDRParserState & m_ps
Definition: CDRStylesCollector.h:88
CDRCollector.h
CDRTypes.h
libcdr::CDRStylesCollector::collectFildId
void collectFildId(unsigned)
Definition: CDRStylesCollector.h:64
libcdr::CDRParserState
Definition: CDRCollector.h:75
libcdr::CDRColor
Definition: CDRTypes.h:58
libcdr::CDRGradient
Definition: CDRTypes.h:80
CDRPath.h
libcdr::CDRStylesCollector::collectPageSize
void collectPageSize(double, double)
Definition: CDRStylesCollector.h:72
libcdr::CDRCollector
Definition: CDRCollector.h:96
libcdr::CDRStylesCollector::collectFillOpacity
void collectFillOpacity(double)
Definition: CDRStylesCollector.h:79
libcdr::CDRStylesCollector::collectOutlId
void collectOutlId(unsigned)
Definition: CDRStylesCollector.h:65