00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef __CDRSTYLESCOLLECTOR_H__
00031 #define __CDRSTYLESCOLLECTOR_H__
00032
00033 #include <map>
00034 #include <vector>
00035 #include <stack>
00036 #include <libwpg/libwpg.h>
00037 #include <lcms2.h>
00038 #include "CDRTypes.h"
00039 #include "CDRPath.h"
00040 #include "CDROutputElementList.h"
00041 #include "CDRCollector.h"
00042 #include "libcdr_utils.h"
00043
00044 namespace libcdr
00045 {
00046
00047 class CDRStylesCollector : public CDRCollector
00048 {
00049 public:
00050 CDRStylesCollector(CDRParserState &ps);
00051 virtual ~CDRStylesCollector();
00052
00053
00054 void collectPage(unsigned level);
00055 void collectObject(unsigned) {}
00056 void collectGroup(unsigned) {}
00057 void collectVect(unsigned) {}
00058 void collectOtherList() {}
00059 void collectCubicBezier(double, double, double, double, double, double) {}
00060 void collectQuadraticBezier(double, double, double, double) {}
00061 void collectMoveTo(double, double) {}
00062 void collectLineTo(double, double) {}
00063 void collectArcTo(double, double, bool, bool, double, double) {}
00064 void collectClosePath() {}
00065 void collectLevel(unsigned) {}
00066 void collectTransform(double, double, double, double, double, double, bool) {}
00067 void collectFildId(unsigned) {}
00068 void collectOutlId(unsigned) {}
00069 void collectFild(unsigned id, unsigned short fillType, const CDRColor &color1, const CDRColor &color2, const CDRGradient &gradient, const CDRImageFill &imageFill);
00070 void collectOutl(unsigned id, unsigned short lineType, unsigned short capsType, unsigned short joinType, double lineWidth,
00071 double stretch, double angle, const CDRColor &color, const std::vector<unsigned short> &dashArray,
00072 unsigned startMarkerId, unsigned endMarkerId);
00073 void collectRotate(double,double,double) {}
00074 void collectFlags(unsigned, bool) {}
00075 void collectPageSize(double width, double height, double offsetX, double offsetY);
00076 void collectPolygonTransform(unsigned, unsigned, double, double, double, double) {}
00077 void collectBitmap(unsigned, double, double, double, double) {}
00078 void collectBmp(unsigned imageId, unsigned colorModel, unsigned width, unsigned height, unsigned bpp, const std::vector<unsigned> &palette, const std::vector<unsigned char> &bitmap);
00079 void collectBmp(unsigned imageId, const std::vector<unsigned char> &bitmap);
00080 void collectBmpf(unsigned patternId, unsigned width, unsigned height, const std::vector<unsigned char> &pattern);
00081 void collectPpdt(const std::vector<std::pair<double, double> > &, const std::vector<unsigned> &) {}
00082 void collectFillTransform(double, double, double, double, double, double) {}
00083 void collectFillOpacity(double) {}
00084 void collectPolygon() {}
00085 void collectSpline() {}
00086 void collectColorProfile(const std::vector<unsigned char> &profile);
00087 void collectBBox(double, double, double, double) {}
00088 void collectSpnd(unsigned) {}
00089 void collectVectorPattern(unsigned, const WPXBinaryData &) {}
00090 void collectPaletteEntry(unsigned colorId, unsigned userId, const CDRColor &color);
00091 void collectFont(unsigned fontId, unsigned short fontEncoding, const WPXString &font);
00092 void collectText(unsigned textId, unsigned styleId, const std::vector<unsigned char> &data,
00093 const std::vector<uint64_t> &charDescriptions, const std::map<unsigned, CDRCharacterStyle> &styleOverrides);
00094 void collectArtisticText() {}
00095 void collectParagraphText() {}
00096 void collectStlt(const std::map<unsigned, CDRCharacterStyle> &charStyles);
00097
00098 private:
00099 CDRStylesCollector(const CDRStylesCollector &);
00100 CDRStylesCollector &operator=(const CDRStylesCollector &);
00101
00102 CDRParserState &m_ps;
00103 CDRPage m_page;
00104 std::map<unsigned, CDRCharacterStyle> m_charStyles;
00105 };
00106
00107 }
00108
00109 #endif
00110