CMXParser.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 __CMXPARSER_H__
11 #define __CMXPARSER_H__
12
13 #include <vector>
14 #include <map>
15 #include <memory>
16
17 #include <librevenge-stream/librevenge-stream.h>
18
19 #include "CDRTransforms.h"
20 #include "CDRTypes.h"
21 #include "CommonParser.h"
22
23 #define CMX_MASTER_INDEX_TABLE 1
24 #define CMX_PAGE_INDEX_TABLE 2
25 #define CMX_MASTER_LAYER_TABLE 3
26 #define CMX_PROCEDURE_INDEX_TABLE 4
27 #define CMX_BITMAP_INDEX_TABLE 5
28 #define CMX_ARROW_INDEX_TABLE 6
29 #define CMX_FONT_INDEX_TABLE 7
30 #define CMX_EMBEDDED_FILE_INDEX_TABLE 8
31 #define CMX_THUMBNAIL_SECTION 10
32 #define CMX_OUTLINE_DESCRIPTION_SECTION 15
33 #define CMX_LINE_STYLE_DESCRIPTION_SECTION 16
34 #define CMX_ARROWHEADS_DESCRIPTION_SECTION 17
35 #define CMX_SCREEN_DESCRIPTION_SECTION 18
36 #define CMX_PEN_DESCRIPTION_SECTION 19
37 #define CMX_DOT_DASH_DESCRIPTION_SECTION 20
38 #define CMX_COLOR_DESCRIPTION_SECTION 21
39 #define CMX_COLOR_CORRECTION_SECTION 22
40 #define CMX_PREVIEW_BOX_SECTION 23
41
42 namespace libcdr
43 {
44
45 class CDRCollector;
46
47 struct CMXOutline
48 {
49 CMXOutline()
50 : m_lineStyle(0), m_screen(0), m_color(0),
51 m_arrowHeads(0), m_pen(0), m_dashArray(0) {}
52 unsigned short m_lineStyle;
53 unsigned short m_screen;
54 unsigned short m_color;
55 unsigned short m_arrowHeads;
56 unsigned short m_pen;
57 unsigned short m_dashArray;
58 };
59
60 struct CMXPen
61 {
62 CMXPen()
63 : m_width(0.0), m_aspect(1.0), m_angle(0.0), m_matrix() {}
64 double m_width;
65 double m_aspect;
66 double m_angle;
67 CDRTransform m_matrix;
68 };
69
70 struct CMXLineStyle
71 {
72 CMXLineStyle() : m_spec(0), m_capAndJoin(0) {}
73 unsigned char m_spec;
74 unsigned char m_capAndJoin;
75 };
76
77 struct CMXImageInfo
78 {
79 CMXImageInfo()
80 : m_type(0), m_compression(0), m_size(0), m_compressedSize(0) {}
81 unsigned short m_type;
82 unsigned short m_compression;
83 unsigned m_size;
84 unsigned m_compressedSize;
85 };
86
87 struct CMXParserState
88 {
89 CMXParserState()
90 : m_colorPalette(), m_dashArrays(), m_lineStyles(),
91 m_pens(), m_outlines(), m_bitmapOffsets(), m_patternOffsets(),
92 m_arrowOffsets(), m_embeddedOffsets(), m_embeddedOffsetTypes() {}
93 std::map<unsigned, CDRColor> m_colorPalette;
94 std::map<unsigned, std::vector<unsigned> > m_dashArrays;
95 std::map<unsigned, CMXLineStyle> m_lineStyles;
96 std::map<unsigned, CMXPen> m_pens;
97 std::map<unsigned, CMXOutline> m_outlines;
98 std::map<unsigned, unsigned> m_bitmapOffsets;
99 std::map<unsigned, unsigned> m_patternOffsets;
100 std::map<unsigned, unsigned> m_arrowOffsets;
101 std::map<unsigned, unsigned> m_embeddedOffsets;
102 std::map<unsigned, unsigned> m_embeddedOffsetTypes;
103 };
104
105 class CMXParser : protected CommonParser
106 {
107 public:
108 explicit CMXParser(CDRCollector *collector, CMXParserState &parserState);
109 ~CMXParser() override;
110 bool parseRecords(librevenge::RVNGInputStream *input, long size = -1, unsigned level = 0);
111
112 private:
113 CMXParser();
114 CMXParser(const CMXParser &);
115 CMXParser &operator=(const CMXParser &);
116 bool parseRecord(librevenge::RVNGInputStream *input, unsigned level = 0);
117 void readRecord(unsigned fourCC, unsigned &length, librevenge::RVNGInputStream *input);
118 void parseImage(librevenge::RVNGInputStream *input);
119
120 void readCMXHeader(librevenge::RVNGInputStream *input);
121 void readDisp(librevenge::RVNGInputStream *input);
122 void readPage(librevenge::RVNGInputStream *input);
123 void readProc(librevenge::RVNGInputStream *input);
124 void readRclr(librevenge::RVNGInputStream *input);
125 void readRotl(librevenge::RVNGInputStream *input);
126 void readRott(librevenge::RVNGInputStream *input);
127 void readRdot(librevenge::RVNGInputStream *input);
128 void readRpen(librevenge::RVNGInputStream *input);
129 void readIxtl(librevenge::RVNGInputStream *input);
130 void readIxef(librevenge::RVNGInputStream *input);
131 void readIxmr(librevenge::RVNGInputStream *input);
132 void readIxpg(librevenge::RVNGInputStream *input);
133 void readIxpc(librevenge::RVNGInputStream *input);
134 void readInfo(librevenge::RVNGInputStream *input);
135 void readData(librevenge::RVNGInputStream *input);
136
137 // Command readers
138 void readCommands(librevenge::RVNGInputStream *input, unsigned length);
139 void readBeginPage(librevenge::RVNGInputStream *input);
140 void readBeginLayer(librevenge::RVNGInputStream *input);
141 void readBeginGroup(librevenge::RVNGInputStream *input);
142 void readPolyCurve(librevenge::RVNGInputStream *input);
143 void readEllipse(librevenge::RVNGInputStream *input);
144 void readRectangle(librevenge::RVNGInputStream *input);
145 void readJumpAbsolute(librevenge::RVNGInputStream *input);
146 void readDrawImage(librevenge::RVNGInputStream *input);
147 void readBeginProcedure(librevenge::RVNGInputStream *input);
148
149 // Types readers
150 CDRTransform readMatrix(librevenge::RVNGInputStream *input);
151 CDRBox readBBox(librevenge::RVNGInputStream *input);
152 librevenge::RVNGString readString(librevenge::RVNGInputStream *input);
153 bool readFill(librevenge::RVNGInputStream *input);
154 bool readLens(librevenge::RVNGInputStream *input);
155
156 // Complex types readers
157 bool readRenderingAttributes(librevenge::RVNGInputStream *input);
158
159 // Helper Functions
160 CDRColor getPaletteColor(unsigned id);
161 CDRColor readColor(librevenge::RVNGInputStream *input, unsigned char colorModel);
162 CDRLineStyle getLineStyle(unsigned id);
163 const unsigned *_getOffsetByType(unsigned short type, const std::map<unsigned short, unsigned> &offsets);
164
165 bool m_bigEndian;
166 unsigned short m_unit;
167 double m_scale;
168 double m_xmin, m_xmax, m_ymin, m_ymax;
169 unsigned m_fillIndex;
170 unsigned m_nextInstructionOffset;
171 CMXParserState &m_parserState;
172 CMXImageInfo m_currentImageInfo;
173 std::unique_ptr<CDRPattern> m_currentPattern;
174 std::unique_ptr<CDRBitmap> m_currentBitmap;
175 };
176
177 } // namespace libcdr
178
179 #endif // __CMXPARSER_H__
180 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libcdr::CMXImageInfo::m_type
unsigned short m_type
Definition: CMXParser.h:81
CMX_Tag_DescrSection_Color_Base
#define CMX_Tag_DescrSection_Color_Base
Definition: CMXDocumentStructure.h:138
libcdr::CDRLineStyle::lineWidth
double lineWidth
Definition: CDRTypes.h:118
CMX_Tag_RenderAttr_FillSpec_ColorBM
#define CMX_Tag_RenderAttr_FillSpec_ColorBM
Definition: CMXDocumentStructure.h:119
libcdr::CMXParser::readIxef
void readIxef(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1994
libcdr::readU8
uint8_t readU8(librevenge::RVNGInputStream *input, bool bigEndian=false)
Definition: libcdr_utils.cpp:163
libcdr::CDRBitmap
Definition: CDRTypes.h:226
CMX_Tag_Ellips_EllipsSpecification
#define CMX_Tag_Ellips_EllipsSpecification
Definition: CMXDocumentStructure.h:76
libcdr::CMXParser::readBeginProcedure
void readBeginProcedure(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:919
libcdr::CMXPen::m_aspect
double m_aspect
Definition: CMXParser.h:65
libcdr::CMXPen::m_angle
double m_angle
Definition: CMXParser.h:66
libcdr::CDRBox::getHeight
double getHeight() const
Definition: CDRTypes.h:38
libcdr::CMXParser::readFill
bool readFill(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1061
libcdr::CMXParser::getLineStyle
CDRLineStyle getLineStyle(unsigned id)
Definition: CMXParser.cpp:2339
libcdr::CMXParser::readRpen
void readRpen(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1895
libcdr::CMXParser::readBBox
CDRBox readBBox(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:996
libcdr::CMXOutline::CMXOutline
CMXOutline()
Definition: CMXParser.h:49
libcdr::CMXParser::readRectangle
void readRectangle(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:830
CMX_Tag_BeginPage_PageSpecification
#define CMX_Tag_BeginPage_PageSpecification
Definition: CMXDocumentStructure.h:31
CMX_PEN_DESCRIPTION_SECTION
#define CMX_PEN_DESCRIPTION_SECTION
Definition: CMXParser.h:36
libcdr::CDRGradientStop::m_color
CDRColor m_color
Definition: CDRTypes.h:64
libcdr::CMXLineStyle::m_spec
unsigned char m_spec
Definition: CMXParser.h:73
CDR_FOURCC_cont
#define CDR_FOURCC_cont
Definition: CDRDocumentStructure.h:39
libcdr::CDRLineStyle::angle
double angle
Definition: CDRTypes.h:120
CMX_Tag_Rectangle_RectangleSpecification
#define CMX_Tag_Rectangle_RectangleSpecification
Definition: CMXDocumentStructure.h:90
libcdr::CMXParser::m_scale
double m_scale
Definition: CMXParser.h:167
CMX_DOT_DASH_DESCRIPTION_SECTION
#define CMX_DOT_DASH_DESCRIPTION_SECTION
Definition: CMXParser.h:37
CMX_Tag_DescrSection_LineStyle
#define CMX_Tag_DescrSection_LineStyle
Definition: CMXDocumentStructure.h:156
libcdr::CMXLineStyle::m_capAndJoin
unsigned char m_capAndJoin
Definition: CMXParser.h:74
libcdr::CDRPath::appendQuadraticBezierTo
void appendQuadraticBezierTo(double x1, double y1, double x, double y)
Definition: CDRPath.cpp:651
libcdr::CMXPen::m_matrix
CDRTransform m_matrix
Definition: CMXParser.h:67
CMX_Tag_PolyCurve_PointList
#define CMX_Tag_PolyCurve_PointList
Definition: CMXDocumentStructure.h:81
CMX_Tag_DrawImage_DrawImageSpecification
#define CMX_Tag_DrawImage_DrawImageSpecification
Definition: CMXDocumentStructure.h:70
CDR_FOURCC_page
#define CDR_FOURCC_page
Definition: CDRDocumentStructure.h:97
CMX_COLOR_DESCRIPTION_SECTION
#define CMX_COLOR_DESCRIPTION_SECTION
Definition: CMXParser.h:38
CMX_Tag_RenderAttr_FillSpec
#define CMX_Tag_RenderAttr_FillSpec
Definition: CMXDocumentStructure.h:107
libcdr::CMXParser::readMatrix
CDRTransform readMatrix(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:966
CDR_FOURCC_RIFF
#define CDR_FOURCC_RIFF
Definition: CDRDocumentStructure.h:105
CMX_Tag_EndTag
#define CMX_Tag_EndTag
Definition: CMXDocumentStructure.h:165
libcdr::CMXParser::_getOffsetByType
const unsigned * _getOffsetByType(unsigned short type, const std::map< unsigned short, unsigned > &offsets)
Definition: CMXParser.cpp:339
CMX_Tag_DescrSection_Image_ImageData
#define CMX_Tag_DescrSection_Image_ImageData
Definition: CMXDocumentStructure.h:150
CDR_FOURCC_imag
#define CDR_FOURCC_imag
Definition: CDRDocumentStructure.h:65
CMX_OUTLINE_DESCRIPTION_SECTION
#define CMX_OUTLINE_DESCRIPTION_SECTION
Definition: CMXParser.h:32
CDR_FOURCC_ixtl
#define CDR_FOURCC_ixtl
Definition: CDRDocumentStructure.h:73
libcdr::CDRGradientStop
Definition: CDRTypes.h:62
CDR_FOURCC_data
#define CDR_FOURCC_data
Definition: CDRDocumentStructure.h:42
CDR_DEBUG_MSG
#define CDR_DEBUG_MSG(M)
Definition: libcdr_utils.h:56
CMX_Tag_Ellips_RenderingAttr
#define CMX_Tag_Ellips_RenderingAttr
Definition: CMXDocumentStructure.h:75
libcdr::CMXParser::operator=
CMXParser & operator=(const CMXParser &)
CDR_FOURCC_ixpg
#define CDR_FOURCC_ixpg
Definition: CDRDocumentStructure.h:72
CMXParser.h
CMX_Tag_RenderAttr_FillSpec_Texture
#define CMX_Tag_RenderAttr_FillSpec_Texture
Definition: CMXDocumentStructure.h:121
libcdr::CMXParser::readLens
bool readLens(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1017
libcdr::CMXParser::readIxtl
void readIxtl(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1949
libcdr::CMXParser::getPaletteColor
CDRColor getPaletteColor(unsigned id)
Definition: CMXParser.cpp:2212
CMX_Tag_RenderAttr_OutlineSpec
#define CMX_Tag_RenderAttr_OutlineSpec
Definition: CMXDocumentStructure.h:105
libcdr::CDRLineStyle::color
CDRColor color
Definition: CDRTypes.h:121
libcdr::CMXParser::readRotl
void readRotl(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1838
CMX_EMBEDDED_FILE_INDEX_TABLE
#define CMX_EMBEDDED_FILE_INDEX_TABLE
Definition: CMXParser.h:30
libcdr::CMXParser::m_xmax
double m_xmax
Definition: CMXParser.h:168
libcdr::CMXParserState::m_embeddedOffsets
std::map< unsigned, unsigned > m_embeddedOffsets
Definition: CMXParser.h:101
libcdr::CDRCollector
Definition: CDRCollector.h:61
CMX_PAGE_INDEX_TABLE
#define CMX_PAGE_INDEX_TABLE
Definition: CMXParser.h:24
CommonParser.h
CMX_BITMAP_INDEX_TABLE
#define CMX_BITMAP_INDEX_TABLE
Definition: CMXParser.h:27
libcdr::CMXPen::CMXPen
CMXPen()
Definition: CMXParser.h:62
libcdr::CMXParserState::m_embeddedOffsetTypes
std::map< unsigned, unsigned > m_embeddedOffsetTypes
Definition: CMXParser.h:102
CDRTransforms.h
libcdr::CDRGradient::m_angle
double m_angle
Definition: CDRTypes.h:75
libcdr::CMXParser::m_currentBitmap
std::unique_ptr< CDRBitmap > m_currentBitmap
Definition: CMXParser.h:174
CMX_Command_BeginPage
#define CMX_Command_BeginPage
Definition: CMXDocumentStructure.h:173
CMX_Tag_Rectangle_RenderingAttr
#define CMX_Tag_Rectangle_RenderingAttr
Definition: CMXDocumentStructure.h:89
CDR_FOURCC_proc
#define CDR_FOURCC_proc
Definition: CDRDocumentStructure.h:102
libcdr::CMXOutline::m_screen
unsigned short m_screen
Definition: CMXParser.h:53
CMX_Tag_DescrSection_Image_ImageInfo
#define CMX_Tag_DescrSection_Image_ImageInfo
Definition: CMXDocumentStructure.h:146
libcdr::CMXParser::readIxpg
void readIxpg(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:2031
MAX_RECORD_DEPTH
static const int MAX_RECORD_DEPTH
Definition: CMXParser.cpp:32
libcdr::CDRLineStyle
Definition: CDRTypes.h:113
libcdr::CMXParser::readRott
void readRott(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1789
libcdr::CMXParser::m_nextInstructionOffset
unsigned m_nextInstructionOffset
Definition: CMXParser.h:170
libcdr::CDRLineStyle::capsType
unsigned short capsType
Definition: CDRTypes.h:116
libcdr::CMXParser::readIxmr
void readIxmr(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:347
libcdr::CDRLineStyle::joinType
unsigned short joinType
Definition: CDRTypes.h:117
libcdr::CMXParser::parseRecords
bool parseRecords(librevenge::RVNGInputStream *input, long size=-1, unsigned level=0)
Definition: CMXParser.cpp:83
libcdr::CDRBox::m_h
double m_h
Definition: CDRTypes.h:29
libcdr::CMXParserState::m_arrowOffsets
std::map< unsigned, unsigned > m_arrowOffsets
Definition: CMXParser.h:100
libcdr::CMXImageInfo::m_compressedSize
unsigned m_compressedSize
Definition: CMXParser.h:84
libcdr::CDRTransform
Definition: CDRTransforms.h:19
libcdr::CMXParser::m_currentImageInfo
CMXImageInfo m_currentImageInfo
Definition: CMXParser.h:172
libcdr::readS32
int32_t readS32(librevenge::RVNGInputStream *input, bool bigEndian=false)
Definition: libcdr_utils.cpp:224
CDR_FOURCC_rclr
#define CDR_FOURCC_rclr
Definition: CDRDocumentStructure.h:108
libcdr::CMXOutline
Definition: CMXParser.h:47
CDR_FOURCC_ixef
#define CDR_FOURCC_ixef
Definition: CDRDocumentStructure.h:68
libcdr::readU16
uint16_t readU16(librevenge::RVNGInputStream *input, bool bigEndian=false)
Definition: libcdr_utils.cpp:179
libcdr::CDRGradient::m_stops
std::vector< CDRGradientStop > m_stops
Definition: CDRTypes.h:80
CMX_Command_Ellipse
#define CMX_Command_Ellipse
Definition: CMXDocumentStructure.h:185
libcdr::CMXParser::readString
librevenge::RVNGString readString(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1006
libcdr::CMXParser::readData
void readData(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:2144
libcdr::CMXParser::readPolyCurve
void readPolyCurve(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:589
libcdr::CMXOutline::m_lineStyle
unsigned short m_lineStyle
Definition: CMXParser.h:52
libcdr::CMXParser::readCommands
void readCommands(librevenge::RVNGInputStream *input, unsigned length)
Definition: CMXParser.cpp:416
libcdr::CMXImageInfo
Definition: CMXParser.h:77
libcdr::CDRColor::m_colorValue
unsigned m_colorValue
Definition: CDRTypes.h:56
CDR_FOURCC_ixmr
#define CDR_FOURCC_ixmr
Definition: CDRDocumentStructure.h:70
CDRPath.h
libcdr::CDRLineStyle::lineType
unsigned short lineType
Definition: CDRTypes.h:115
CMX_Tag_PolyCurve_RenderingAttr
#define CMX_Tag_PolyCurve_RenderingAttr
Definition: CMXDocumentStructure.h:80
libcdr::CMXParserState::m_dashArrays
std::map< unsigned, std::vector< unsigned > > m_dashArrays
Definition: CMXParser.h:94
libcdr::CMXParser
Definition: CMXParser.h:105
libcdr::CDRGradient::m_centerXOffset
int m_centerXOffset
Definition: CDRTypes.h:78
CMX_LINE_STYLE_DESCRIPTION_SECTION
#define CMX_LINE_STYLE_DESCRIPTION_SECTION
Definition: CMXParser.h:33
libcdr::CoordinatePrecision
CoordinatePrecision
Definition: CommonParser.h:24
libcdr::CMXParser::readDrawImage
void readDrawImage(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:769
libcdr::readS16
int16_t readS16(librevenge::RVNGInputStream *input, bool bigEndian=false)
Definition: libcdr_utils.cpp:199
CMX_Tag_RenderAttr_FillSpec_Uniform
#define CMX_Tag_RenderAttr_FillSpec_Uniform
Definition: CMXDocumentStructure.h:109
libcdr::CMXParser::readCMXHeader
void readCMXHeader(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:214
libcdr::CMXParser::readJumpAbsolute
void readJumpAbsolute(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1649
libcdr::CMXParserState::m_pens
std::map< unsigned, CMXPen > m_pens
Definition: CMXParser.h:96
libcdr::CDRLineStyle::dashArray
std::vector< unsigned > dashArray
Definition: CDRTypes.h:122
CDRCollector.h
libcdr
Definition: CDRCollector.h:24
libcdr::CDRBox
Definition: CDRTypes.h:24
libcdr::CMXParserState::CMXParserState
CMXParserState()
Definition: CMXParser.h:89
CMX_Tag_DescrSection_Outline
#define CMX_Tag_DescrSection_Outline
Definition: CMXDocumentStructure.h:154
libcdr::CDRGradient::m_mode
unsigned char m_mode
Definition: CDRTypes.h:74
libcdr::CMXParser::m_ymax
double m_ymax
Definition: CMXParser.h:168
libcdr::CMXOutline::m_arrowHeads
unsigned short m_arrowHeads
Definition: CMXParser.h:55
libcdr::CDRBox::getMinX
double getMinX() const
Definition: CDRTypes.h:42
CMX_Tag_DescrSection_Pen
#define CMX_Tag_DescrSection_Pen
Definition: CMXDocumentStructure.h:158
libcdr::CDRPath::appendClosePath
void appendClosePath()
Definition: CDRPath.cpp:666
libcdr::CMXPen::m_width
double m_width
Definition: CMXParser.h:64
libcdr::CMXParser::parseImage
void parseImage(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:153
libcdr::CMXOutline::m_pen
unsigned short m_pen
Definition: CMXParser.h:56
libcdr::CDRBox::getMinY
double getMinY() const
Definition: CDRTypes.h:46
libcdr::CMXParser::m_fillIndex
unsigned m_fillIndex
Definition: CMXParser.h:169
CMX_Tag_JumpAbsolute_Offset
#define CMX_Tag_JumpAbsolute_Offset
Definition: CMXDocumentStructure.h:78
CDR_FOURCC_rdot
#define CDR_FOURCC_rdot
Definition: CDRDocumentStructure.h:109
CMX_Tag_DescrSection_Dash
#define CMX_Tag_DescrSection_Dash
Definition: CMXDocumentStructure.h:141
libcdr::CMXParser::readRdot
void readRdot(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1734
CDR_FOURCC_rott
#define CDR_FOURCC_rott
Definition: CDRDocumentStructure.h:113
libcdr::CDRTransforms::append
void append(double v0, double v1, double x0, double v3, double v4, double y0)
Definition: CDRTransforms.cpp:234
libcdr::CMXImageInfo::m_size
unsigned m_size
Definition: CMXParser.h:83
libcdr::CMXParser::readRecord
void readRecord(unsigned fourCC, unsigned &length, librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:193
libcdr::CDRPath::appendArcTo
void appendArcTo(double rx, double ry, double rotation, bool longAngle, bool sweep, double x, double y)
Definition: CDRPath.cpp:656
libcdr::CDRColor
Definition: CDRTypes.h:53
CMX_Command_DrawImage
#define CMX_Command_DrawImage
Definition: CMXDocumentStructure.h:183
libcdr::CMXParser::m_bigEndian
bool m_bigEndian
Definition: CMXParser.h:165
libcdr::CMXParser::readColor
CDRColor readColor(librevenge::RVNGInputStream *input, unsigned char colorModel)
Definition: CMXParser.cpp:2220
libcdr::CDRFillStyle
Definition: CDRTypes.h:101
libcdr::CMXParser::readRenderingAttributes
bool readRenderingAttributes(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1476
libcdr::CMXParser::readEllipse
void readEllipse(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:664
libcdr::CMXParserState::m_bitmapOffsets
std::map< unsigned, unsigned > m_bitmapOffsets
Definition: CMXParser.h:98
libcdr::CDRGradient::m_edgeOffset
int m_edgeOffset
Definition: CDRTypes.h:77
libcdr::CDRPath::appendMoveTo
void appendMoveTo(double x, double y)
Definition: CDRPath.cpp:636
CDRTypes.h
libcdr::PRECISION_UNKNOWN
Definition: CommonParser.h:25
CMX_Tag_BeginGroup_GroupSpecification
#define CMX_Tag_BeginGroup_GroupSpecification
Definition: CMXDocumentStructure.h:25
libcdr::CommonParser
Definition: CommonParser.h:27
libcdr::CMXPen
Definition: CMXParser.h:60
libcdr::CDRBox::getWidth
double getWidth() const
Definition: CDRTypes.h:34
CDR_FOURCC_info
#define CDR_FOURCC_info
Definition: CDRDocumentStructure.h:67
libcdr::CMXParser::CMXParser
CMXParser()
libcdr::CDRTransforms
Definition: CDRTransforms.h:48
CDRDocumentStructure.h
libcdr::CMXOutline::m_dashArray
unsigned short m_dashArray
Definition: CMXParser.h:57
CMX_Tag_RenderAttr_FillSpec_MonoBM
#define CMX_Tag_RenderAttr_FillSpec_MonoBM
Definition: CMXDocumentStructure.h:117
libcdr::CDRPattern
Definition: CDRTypes.h:216
libcdr::CMXParser::readProc
void readProc(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:480
libcdr::CMXParserState
Definition: CMXParser.h:87
libcdr::CMXParser::m_unit
unsigned short m_unit
Definition: CMXParser.h:166
CMX_PROCEDURE_INDEX_TABLE
#define CMX_PROCEDURE_INDEX_TABLE
Definition: CMXParser.h:26
libcdr::CMXParser::m_parserState
CMXParserState & m_parserState
Definition: CMXParser.h:171
CMX_Tag_DrawImage_RenderingAttr
#define CMX_Tag_DrawImage_RenderingAttr
Definition: CMXDocumentStructure.h:69
CMX_Command_JumpAbsolute
#define CMX_Command_JumpAbsolute
Definition: CMXDocumentStructure.h:195
libcdr::CMXImageInfo::CMXImageInfo
CMXImageInfo()
Definition: CMXParser.h:79
libcdr::CMXParser::m_ymin
double m_ymin
Definition: CMXParser.h:168
libcdr::CMXLineStyle
Definition: CMXParser.h:70
libcdr::CMXParser::m_xmin
double m_xmin
Definition: CMXParser.h:168
libcdr::PRECISION_32BIT
Definition: CommonParser.h:25
CMX_Tag_RenderAttr_FillSpec_Fountain_Base
#define CMX_Tag_RenderAttr_FillSpec_Fountain_Base
Definition: CMXDocumentStructure.h:111
libcdr::CMXParser::readIxpc
void readIxpc(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:2066
libcdr::CDRGradientStop::m_offset
double m_offset
Definition: CDRTypes.h:65
libcdr::CMXParser::parseRecord
bool parseRecord(librevenge::RVNGInputStream *input, unsigned level=0)
Definition: CMXParser.cpp:101
libcdr::CMXParserState::m_patternOffsets
std::map< unsigned, unsigned > m_patternOffsets
Definition: CMXParser.h:99
CMX_Tag_BeginPage_Matrix
#define CMX_Tag_BeginPage_Matrix
Definition: CMXDocumentStructure.h:32
M_PI
#define M_PI
Definition: libcdr_utils.h:27
CMXDocumentStructure.h
libcdr::CMXParser::m_currentPattern
std::unique_ptr< CDRPattern > m_currentPattern
Definition: CMXParser.h:173
CMX_Command_PolyCurve
#define CMX_Command_PolyCurve
Definition: CMXDocumentStructure.h:196
libcdr::CDRGradient
Definition: CDRTypes.h:71
libcdr::readDouble
double readDouble(librevenge::RVNGInputStream *input, bool bigEndian=false)
Definition: libcdr_utils.cpp:249
CDR_FOURCC_rpen
#define CDR_FOURCC_rpen
Definition: CDRDocumentStructure.h:114
libcdr::CDRPath::appendLineTo
void appendLineTo(double x, double y)
Definition: CDRPath.cpp:641
CMX_Command_Rectangle
#define CMX_Command_Rectangle
Definition: CMXDocumentStructure.h:201
libcdr::CMXParser::readRclr
void readRclr(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:1683
libcdr::CMXParser::readDisp
void readDisp(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:290
libcdr::CMXParser::~CMXParser
~CMXParser() override
Definition: CMXParser.cpp:79
CDR_FOURCC_rotl
#define CDR_FOURCC_rotl
Definition: CDRDocumentStructure.h:112
CDR_FOURCC_DISP
#define CDR_FOURCC_DISP
Definition: CDRDocumentStructure.h:44
libcdr::CDRLineStyle::stretch
double stretch
Definition: CDRTypes.h:119
libcdr::CDRBox::m_w
double m_w
Definition: CDRTypes.h:28
CMX_Command_BeginLayer
#define CMX_Command_BeginLayer
Definition: CMXDocumentStructure.h:172
CDR_FOURCC_RIFX
#define CDR_FOURCC_RIFX
Definition: CDRDocumentStructure.h:106
libcdr::CMXParserState::m_outlines
std::map< unsigned, CMXOutline > m_outlines
Definition: CMXParser.h:97
CMX_Tag_RenderAttr_LensSpec_Base
#define CMX_Tag_RenderAttr_LensSpec_Base
Definition: CMXDocumentStructure.h:126
libcdr::CDRPath
Definition: CDRPath.h:36
libcdr::CMXImageInfo::m_compression
unsigned short m_compression
Definition: CMXParser.h:82
libcdr_utils.h
libcdr::CDRBox::m_y
double m_y
Definition: CDRTypes.h:27
CMX_Tag_BeginProcedure_ProcedureSpecification
#define CMX_Tag_BeginProcedure_ProcedureSpecification
Definition: CMXDocumentStructure.h:50
CMX_Command_BeginGroup
#define CMX_Command_BeginGroup
Definition: CMXDocumentStructure.h:171
libcdr::CMXParserState::m_lineStyles
std::map< unsigned, CMXLineStyle > m_lineStyles
Definition: CMXParser.h:95
libcdr::CDRGradient::m_centerYOffset
int m_centerYOffset
Definition: CDRTypes.h:79
libcdr::PRECISION_16BIT
Definition: CommonParser.h:25
libcdr::CDRGradient::m_type
unsigned char m_type
Definition: CDRTypes.h:73
libcdr::CMXLineStyle::CMXLineStyle
CMXLineStyle()
Definition: CMXParser.h:72
libcdr::CDRColor::m_colorModel
unsigned short m_colorModel
Definition: CDRTypes.h:55
libcdr::getRemainingLength
unsigned long getRemainingLength(librevenge::RVNGInputStream *input)
Definition: libcdr_utils.cpp:301
libcdr::readU32
uint32_t readU32(librevenge::RVNGInputStream *input, bool bigEndian=false)
Definition: libcdr_utils.cpp:204
libcdr::CMXParser::readBeginLayer
void readBeginLayer(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:539
CDR_FOURCC_LIST
#define CDR_FOURCC_LIST
Definition: CDRDocumentStructure.h:80
libcdr::CMXParserState::m_colorPalette
std::map< unsigned, CDRColor > m_colorPalette
Definition: CMXParser.h:93
libcdr::CMXParser::readBeginGroup
void readBeginGroup(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:542
CMX_Tag_RenderAttr_FillSpec_Fountain_Color
#define CMX_Tag_RenderAttr_FillSpec_Fountain_Color
Definition: CMXDocumentStructure.h:112
libcdr::CMXOutline::m_color
unsigned short m_color
Definition: CMXParser.h:54
libcdr::CMXParser::readInfo
void readInfo(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:2103
CDR_FALLTHROUGH
#define CDR_FALLTHROUGH
Definition: libcdr_utils.h:44
libcdr::CDRImageFill
Definition: CDRTypes.h:85
CDR_FOURCC_ixpc
#define CDR_FOURCC_ixpc
Definition: CDRDocumentStructure.h:71
CMX_Tag_DescrSection_Color_ColorDescr
#define CMX_Tag_DescrSection_Color_ColorDescr
Definition: CMXDocumentStructure.h:139
libcdr::CMXParser::readBeginPage
void readBeginPage(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:490
libcdr::CDRBox::m_x
double m_x
Definition: CDRTypes.h:26
libcdr::CMXParser::readPage
void readPage(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:470