Go to the documentation of this file.
34 #ifndef CRICKETDRAW_PARSER
35 # define CRICKETDRAW_PARSER
40 #include <librevenge/librevenge.h>
SubDocument(CricketDrawParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: CricketDrawParser.cxx:296
Internal: the structures of a CricketDrawParser.
Definition: CricketDrawParser.cxx:59
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
@ Picture
Definition: CricketDrawParser.cxx:66
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: CricketDrawParser.cxx:392
std::vector< std::vector< float > > m_dashList
the list of dash
Definition: CricketDrawParser.cxx:206
@ Textbox
Definition: CricketDrawParser.cxx:66
@ StarBurst
Definition: CricketDrawParser.cxx:66
MWAWGraphicShape transform(MWAWTransformation const &matrix) const
returns a new shape corresponding to a matrix transformation
Definition: MWAWGraphicShape.cxx:404
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
MWAWVec2f m_translation
the translation
Definition: CricketDrawParser.cxx:131
MWAWBox2f getBdBox() const
returns the basic bdbox
Definition: MWAWGraphicShape.hxx:197
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: CricketDrawParser.cxx:1156
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
int m_grateN
the grate number
Definition: CricketDrawParser.cxx:153
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:415
void setShadowColor(MWAWColor const &col, float opacity=1)
set the shadow color
Definition: MWAWGraphicStyle.hxx:458
Type m_type
the gradient type
Definition: MWAWGraphicStyle.hxx:260
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: CricketDrawParser.cxx:364
bool m_smoothed
flag to know if the shape is smoothed
Definition: CricketDrawParser.cxx:147
std::vector< PathData > m_path
the list of path component
Definition: MWAWGraphicShape.hxx:228
bool m_closed
flag to know if the shape is closed
Definition: CricketDrawParser.cxx:143
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
MWAWTransformation getTransformation(MWAWTransformation const &transform) const
returns the current transformation
Definition: CricketDrawParser.cxx:100
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
bool readShape()
try to read a shape
Definition: CricketDrawParser.cxx:459
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
int version() const
returns the works version
Definition: MWAWParser.hxx:108
@ Basic
Definition: CricketDrawParser.cxx:66
@ G_Linear
Definition: MWAWGraphicStyle.hxx:177
@ Unknown
Definition: CricketDrawParser.cxx:66
MWAWVec2f m_corners
the rectOval corner size
Definition: CricketDrawParser.cxx:149
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
bool m_locked
flag to know if the shape is locked
Definition: CricketDrawParser.cxx:145
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
std::string str() const
print the color in the form #rrggbb
Definition: libmwaw_internal.cxx:232
static bool getColor(int id, int intensity, MWAWColor &col)
returns the quickdraw color corresponding to some id
Definition: CricketDrawParser.cxx:212
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
MWAWBox2f m_bdBox
the shape bdbox
Definition: MWAWGraphicShape.hxx:218
void setOrder(int ord) const
set background/foward order
Definition: MWAWPosition.hxx:264
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
void initDashs()
init the dashs list
Definition: CricketDrawParser.cxx:247
Internal: the subdocument of a CricketDrawParser.
Definition: CricketDrawParser.cxx:294
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
bool m_flip[2]
two bool to indicated we need to flip the shape or not
Definition: CricketDrawParser.cxx:137
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
MWAWParagraph m_paragraph
the paragraph style
Definition: CricketDrawParser.cxx:163
@ Polygon
Definition: MWAWGraphicShape.hxx:49
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:206
MWAWBox2f m_box[2]
the main box (before translation and after translation)
Definition: CricketDrawParser.cxx:129
MWAWEntry m_bitmap
the bitmap entry
Definition: CricketDrawParser.cxx:167
SubDocumentType
Definition: libmwaw_internal.hxx:188
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:401
int m_starBustAngles[3]
the starbust angle: min, max, delta
Definition: CricketDrawParser.cxx:157
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
MWAWGraphicStyle m_style
the style
Definition: CricketDrawParser.cxx:139
T y() const
second element
Definition: libmwaw_internal.hxx:673
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
SubDocument & operator=(SubDocument const &orig)=delete
MWAWVec2i m_angles
the arc limits
Definition: CricketDrawParser.cxx:151
bool sendText(int zoneId)
try to send a text zone to the listener
Definition: CricketDrawParser.cxx:1433
T x() const
first element
Definition: libmwaw_internal.hxx:668
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
a structure used to define the gradient limit in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:141
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
bool m_flip[2]
two bool to indicated we need to flip the shape or not
Definition: MWAWGraphicStyle.hxx:560
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:226
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:284
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
int m_id
the subdocument id
Definition: CricketDrawParser.cxx:318
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
#define M_PI
Definition: libmwaw_internal.hxx:52
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
@ Path
Definition: MWAWGraphicShape.hxx:49
MWAWGraphicShape m_shape
the shape
Definition: CricketDrawParser.cxx:127
Type m_type
the type
Definition: MWAWGraphicShape.hxx:216
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
Definition: libmwaw_internal.hxx:144
SubDocument(SubDocument const &orig)=delete
long m_ids[2]
the ids
Definition: CricketDrawParser.cxx:125
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
MWAWColor m_textColor
the text color
Definition: CricketDrawParser.cxx:165
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:553
bool createZones()
finds the different objects zones
Definition: CricketDrawParser.cxx:414
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: CricketDrawParser.cxx:324
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
std::vector< Shape > m_shapeList
the list of shape
Definition: CricketDrawParser.cxx:209
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
Internal: the state of a CricketDrawParser.
Definition: CricketDrawParser.cxx:180
long m_groupIds[2]
some unknown group id
Definition: CricketDrawParser.cxx:159
static MWAWGraphicShape arc(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:137
CricketDrawParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: CricketDrawParser.cxx:345
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
Type
the different shape type
Definition: CricketDrawParser.cxx:65
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:516
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
float m_rotation
the rotation angle
Definition: CricketDrawParser.cxx:133
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1072
Shape()
constructor
Definition: CricketDrawParser.cxx:69
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
int m_grateType
the grate type
Definition: CricketDrawParser.cxx:155
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:357
Gradient m_gradient
the gradient
Definition: MWAWGraphicStyle.hxx:533
int m_bitmapRowSize
the bitmap row size
Definition: CricketDrawParser.cxx:171
std::vector< MWAWVec2f > m_vertices
the list of point
Definition: CricketDrawParser.cxx:141
@ MWAW_T_CRICKETDRAW
Cricket Draw: v1.0.1 and v1.1.1.
Definition: MWAWDocument.hxx:210
@ Page
Definition: MWAWPosition.hxx:51
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
@ JustificationFull
Definition: MWAWParagraph.hxx:90
@ JustificationRight
Definition: MWAWParagraph.hxx:91
MWAWVec2< T > const & min() const
the minimum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:1039
bool m_isSent
flag to know if a shape is already sent
Definition: CricketDrawParser.cxx:175
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: MWAWGraphicStyle.hxx:506
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
State()
constructor
Definition: CricketDrawParser.cxx:182
MWAWVec3< float > MWAWVec3f
MWAWVec3 of float.
Definition: libmwaw_internal.hxx:1019
bool getDash(int id, std::vector< float > &dash)
returns a dash corresponding to some id
Definition: CricketDrawParser.cxx:190
bool send(CricketDrawParserInternal::Shape const &shape, MWAWTransformation const &transform)
try to send a shape
Definition: CricketDrawParser.cxx:1313
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: CricketDrawParser.cxx:304
bool readPrintInfo()
try to read the print info zone
Definition: CricketDrawParser.cxx:1211
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
std::shared_ptr< CricketDrawParserInternal::State > m_state
the state
Definition: CricketDrawParser.hxx:105
~CricketDrawParser() final
destructor
Definition: CricketDrawParser.cxx:357
MWAWEntry m_text
the text entry
Definition: CricketDrawParser.cxx:161
Type m_type
the shape type
Definition: CricketDrawParser.cxx:123
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
bool sendBitmap(CricketDrawParserInternal::Shape const &bitmap, MWAWTransformation const &transform)
try to send a bitmap shape
Definition: CricketDrawParser.cxx:1485
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
int m_id
the shape id
Definition: CricketDrawParser.cxx:121
Definition: MWAWDocument.hxx:57
small structure of CricketDrawParserInternal used to stored a shape
Definition: CricketDrawParser.cxx:63
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:544
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
the main class to read a CricketDraw v0,v1 file
Definition: CricketDrawParser.hxx:59
Class to store font.
Definition: MWAWFont.hxx:44
@ GroupEnd
Definition: CricketDrawParser.cxx:66
@ Grate
Definition: CricketDrawParser.cxx:66
MWAWVec2< T > const & max() const
the maximum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:1044
a simple path component
Definition: MWAWGraphicShape.hxx:53
@ G_Radial
Definition: MWAWGraphicStyle.hxx:177
float m_shear
the shear angle
Definition: CricketDrawParser.cxx:135
MWAWVec2f m_shadowOffset
the shadow offset
Definition: MWAWGraphicStyle.hxx:527
~SubDocument() final
destructor
Definition: CricketDrawParser.cxx:301
bool sendAll()
try to send the different zones
Definition: CricketDrawParser.cxx:1272
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:120
@ Group
Definition: CricketDrawParser.cxx:66
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
MWAWBox2i m_bitmapDimension
the bitmap dimension
Definition: CricketDrawParser.cxx:169
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
int m_bitmapScale
the bitmap scaling
Definition: CricketDrawParser.cxx:173
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20