CricketDrawParser.hxx Source File documentation

CricketDrawParser.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2
3 /* libmwaw
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33
34 #ifndef CRICKETDRAW_PARSER
35 # define CRICKETDRAW_PARSER
36
37 #include <string>
38 #include <vector>
39
40 #include <librevenge/librevenge.h>
41
42 #include "MWAWDebug.hxx"
43 #include "MWAWInputStream.hxx"
44
45 #include "MWAWParser.hxx"
46
47 namespace CricketDrawParserInternal
48 {
49 struct Shape;
50 struct State;
51
52 class SubDocument;
53 }
54
58 class CricketDrawParser final : public MWAWGraphicParser
59 {
60 friend class CricketDrawParserInternal::SubDocument;
61 public:
63 CricketDrawParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
65 ~CricketDrawParser() final;
66
68 bool checkHeader(MWAWHeader *header, bool strict=false) final;
69
70 // the main parse function
71 void parse(librevenge::RVNGDrawingInterface *documentInterface) final;
72
73 protected:
75 void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
76
77 protected:
79 bool createZones();
81 bool readShape();
82
84 bool sendAll();
86 bool send(CricketDrawParserInternal::Shape const &shape, MWAWTransformation const &transform);
88 bool sendBitmap(CricketDrawParserInternal::Shape const &bitmap, MWAWTransformation const &transform);
90 bool sendText(int zoneId);
91
92 // Intermediate level
93
95 bool readPrintInfo();
96
97 //
98 // low level
99 //
100
101 //
102 // data
103 //
105 std::shared_ptr<CricketDrawParserInternal::State> m_state;
106 };
107 #endif
108 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
CricketDrawParserInternal::SubDocument::SubDocument
SubDocument(CricketDrawParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: CricketDrawParser.cxx:296
CricketDrawParserInternal
Internal: the structures of a CricketDrawParser.
Definition: CricketDrawParser.cxx:59
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
CricketDrawParserInternal::Shape::Picture
@ Picture
Definition: CricketDrawParser.cxx:66
MWAWParagraph::m_justify
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
CricketDrawParser::createDocument
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: CricketDrawParser.cxx:392
CricketDrawParserInternal::State::m_dashList
std::vector< std::vector< float > > m_dashList
the list of dash
Definition: CricketDrawParser.cxx:206
CricketDrawParserInternal::Shape::Textbox
@ Textbox
Definition: CricketDrawParser.cxx:66
CricketDrawParserInternal::Shape::StarBurst
@ StarBurst
Definition: CricketDrawParser.cxx:66
MWAWGraphicShape::transform
MWAWGraphicShape transform(MWAWTransformation const &matrix) const
returns a new shape corresponding to a matrix transformation
Definition: MWAWGraphicShape.cxx:404
MWAWGraphicListenerPtr
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
CricketDrawParserInternal::Shape::m_translation
MWAWVec2f m_translation
the translation
Definition: CricketDrawParser.cxx:131
MWAWGraphicShape::getBdBox
MWAWBox2f getBdBox() const
returns the basic bdbox
Definition: MWAWGraphicShape.hxx:197
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
CricketDrawParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: CricketDrawParser.cxx:1156
MWAWParser::getGraphicListener
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
CricketDrawParserInternal::Shape::m_grateN
int m_grateN
the grate number
Definition: CricketDrawParser.cxx:153
MWAWGraphicStyle::setSurfaceColor
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:415
MWAWGraphicStyle::setShadowColor
void setShadowColor(MWAWColor const &col, float opacity=1)
set the shadow color
Definition: MWAWGraphicStyle.hxx:458
MWAWGraphicStyle::Gradient::m_type
Type m_type
the gradient type
Definition: MWAWGraphicStyle.hxx:260
CricketDrawParser::parse
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: CricketDrawParser.cxx:364
CricketDrawParserInternal::Shape::m_smoothed
bool m_smoothed
flag to know if the shape is smoothed
Definition: CricketDrawParser.cxx:147
MWAWGraphicShape::m_path
std::vector< PathData > m_path
the list of path component
Definition: MWAWGraphicShape.hxx:228
CricketDrawParserInternal::Shape::m_closed
bool m_closed
flag to know if the shape is closed
Definition: CricketDrawParser.cxx:143
MWAWGraphicStyle::Arrow::plain
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
MWAWColor::white
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
MWAWFont::setColor
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
CricketDrawParserInternal::Shape::getTransformation
MWAWTransformation getTransformation(MWAWTransformation const &transform) const
returns the current transformation
Definition: CricketDrawParser.cxx:100
MWAWParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
CricketDrawParser::readShape
bool readShape()
try to read a shape
Definition: CricketDrawParser.cxx:459
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
MWAWGraphicShape
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MWAWGraphicShape::line
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
MWAWParser::version
int version() const
returns the works version
Definition: MWAWParser.hxx:108
CricketDrawParserInternal::Shape::Basic
@ Basic
Definition: CricketDrawParser.cxx:66
MWAWGraphicStyle::Gradient::G_Linear
@ G_Linear
Definition: MWAWGraphicStyle.hxx:177
MWAWPrinter.hxx
CricketDrawParserInternal::Shape::Unknown
@ Unknown
Definition: CricketDrawParser.cxx:66
CricketDrawParserInternal::Shape::m_corners
MWAWVec2f m_corners
the rectOval corner size
Definition: CricketDrawParser.cxx:149
MWAWDocument::MWAW_K_DRAW
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
CricketDrawParserInternal::Shape::m_locked
bool m_locked
flag to know if the shape is locked
Definition: CricketDrawParser.cxx:145
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
MWAWColor::str
std::string str() const
print the color in the form #rrggbb
Definition: libmwaw_internal.cxx:232
CricketDrawParserInternal::State::getColor
static bool getColor(int id, int intensity, MWAWColor &col)
returns the quickdraw color corresponding to some id
Definition: CricketDrawParser.cxx:212
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
CricketDrawParser.hxx
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MWAWSubDocument
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
MWAWGraphicStyle
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
MWAWGraphicShape::m_bdBox
MWAWBox2f m_bdBox
the shape bdbox
Definition: MWAWGraphicShape.hxx:218
MWAWPosition::setOrder
void setOrder(int ord) const
set background/foward order
Definition: MWAWPosition.hxx:264
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
CricketDrawParserInternal::State::initDashs
void initDashs()
init the dashs list
Definition: CricketDrawParser.cxx:247
CricketDrawParserInternal::SubDocument
Internal: the subdocument of a CricketDrawParser.
Definition: CricketDrawParser.cxx:294
MWAWGraphicShape::circle
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MWAWSubDocument.hxx
CricketDrawParserInternal::Shape::m_flip
bool m_flip[2]
two bool to indicated we need to flip the shape or not
Definition: CricketDrawParser.cxx:137
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
CricketDrawParserInternal::Shape::m_paragraph
MWAWParagraph m_paragraph
the paragraph style
Definition: CricketDrawParser.cxx:163
MWAWGraphicShape::Polygon
@ Polygon
Definition: MWAWGraphicShape.hxx:49
MWAWColor::barycenter
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:206
CricketDrawParserInternal::Shape::m_box
MWAWBox2f m_box[2]
the main box (before translation and after translation)
Definition: CricketDrawParser.cxx:129
CricketDrawParserInternal::Shape::m_bitmap
MWAWEntry m_bitmap
the bitmap entry
Definition: CricketDrawParser.cxx:167
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MWAWGraphicStyle::emptyStyle
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:401
CricketDrawParserInternal::Shape::m_starBustAngles
int m_starBustAngles[3]
the starbust angle: min, max, delta
Definition: CricketDrawParser.cxx:157
MWAWParser::setAsciiName
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
MWAWParagraph.hxx
CricketDrawParserInternal::Shape::m_style
MWAWGraphicStyle m_style
the style
Definition: CricketDrawParser.cxx:139
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:673
MWAWGraphicStyle::m_lineWidth
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
MWAWPosition.hxx
CricketDrawParserInternal::SubDocument::operator=
SubDocument & operator=(SubDocument const &orig)=delete
CricketDrawParserInternal::Shape::m_angles
MWAWVec2i m_angles
the arc limits
Definition: CricketDrawParser.cxx:151
CricketDrawParser::sendText
bool sendText(int zoneId)
try to send a text zone to the listener
Definition: CricketDrawParser.cxx:1433
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MWAWGraphicStyle::Gradient::Stop
a structure used to define the gradient limit in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:141
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
MWAWGraphicStyle::m_flip
bool m_flip[2]
two bool to indicated we need to flip the shape or not
Definition: MWAWGraphicStyle.hxx:560
MWAWGraphicShape::m_vertices
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:226
MWAWColor::isBlack
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:284
MWAWParser::setGraphicListener
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
CricketDrawParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: CricketDrawParser.cxx:318
MWAWParser::setVersion
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
M_PI
#define M_PI
Definition: libmwaw_internal.hxx:52
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
MWAWPictData.hxx
MWAWGraphicShape::Path
@ Path
Definition: MWAWGraphicShape.hxx:49
CricketDrawParserInternal::Shape::m_shape
MWAWGraphicShape m_shape
the shape
Definition: CricketDrawParser.cxx:127
MWAWGraphicShape::m_type
Type m_type
the type
Definition: MWAWGraphicShape.hxx:216
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
MWAWVec2< float >
MWAWGraphicListener.hxx
MWAWGraphicShape.hxx
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
MWAWDebug.hxx
CricketDrawParserInternal::SubDocument::SubDocument
SubDocument(SubDocument const &orig)=delete
CricketDrawParserInternal::Shape::m_ids
long m_ids[2]
the ids
Definition: CricketDrawParser.cxx:125
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition: MWAWHeader.hxx:57
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MWAWTransformation::rotation
static MWAWTransformation rotation(float angle, MWAWVec2f const &center=MWAWVec2f(0, 0))
returns a rotation transformation around center.
Definition: libmwaw_internal.cxx:646
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
CricketDrawParserInternal::Shape::m_textColor
MWAWColor m_textColor
the text color
Definition: CricketDrawParser.cxx:165
MWAWGraphicStyle::m_arrows
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:553
CricketDrawParser::createZones
bool createZones()
finds the different objects zones
Definition: CricketDrawParser.cxx:414
MWAWGraphicParser
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
MWAWColor::black
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
CricketDrawParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: CricketDrawParser.cxx:324
MWAWPageSpan::setMarginTop
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
CricketDrawParserInternal::State::m_shapeList
std::vector< Shape > m_shapeList
the list of shape
Definition: CricketDrawParser.cxx:209
libmwaw::PrinterInfo::read
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
CricketDrawParserInternal::State
Internal: the state of a CricketDrawParser.
Definition: CricketDrawParser.cxx:180
CricketDrawParserInternal::Shape::m_groupIds
long m_groupIds[2]
some unknown group id
Definition: CricketDrawParser.cxx:159
MWAWGraphicShape::arc
static MWAWGraphicShape arc(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:137
CricketDrawParser::CricketDrawParser
CricketDrawParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: CricketDrawParser.cxx:345
MWAWTransformation::decompose
bool decompose(float &rotation, MWAWVec2f &shearing, MWAWTransformation &transform, MWAWVec2f const &center) const
try to decompose the matrix in a rotation + scaling/translation matrix.
Definition: libmwaw_internal.cxx:655
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
CricketDrawParserInternal::Shape::Type
Type
the different shape type
Definition: CricketDrawParser.cxx:65
MWAWGraphicStyle::m_lineColor
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:516
MWAWBox2i
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
MWAWTransformation::translation
static MWAWTransformation translation(MWAWVec2f const &trans)
returns a translation transformation
Definition: libmwaw_internal.hxx:1312
CricketDrawParserInternal::Shape::m_rotation
float m_rotation
the rotation angle
Definition: CricketDrawParser.cxx:133
MWAWBox2::center
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1072
MWAWGraphicStyle.hxx
CricketDrawParserInternal::Shape::Shape
Shape()
constructor
Definition: CricketDrawParser.cxx:69
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
CricketDrawParserInternal::Shape::m_grateType
int m_grateType
the grate type
Definition: CricketDrawParser.cxx:155
MWAWPictBitmapIndexed
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:357
MWAWGraphicStyle::m_gradient
Gradient m_gradient
the gradient
Definition: MWAWGraphicStyle.hxx:533
CricketDrawParserInternal::Shape::m_bitmapRowSize
int m_bitmapRowSize
the bitmap row size
Definition: CricketDrawParser.cxx:171
CricketDrawParserInternal::Shape::m_vertices
std::vector< MWAWVec2f > m_vertices
the list of point
Definition: CricketDrawParser.cxx:141
MWAWDocument::MWAW_T_CRICKETDRAW
@ MWAW_T_CRICKETDRAW
Cricket Draw: v1.0.1 and v1.1.1.
Definition: MWAWDocument.hxx:210
MWAWPosition::Page
@ Page
Definition: MWAWPosition.hxx:51
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
MWAWParagraph::JustificationFull
@ JustificationFull
Definition: MWAWParagraph.hxx:90
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:91
MWAWTransformation
a transformation which stored the first row of a 3x3 perspective matrix
Definition: libmwaw_internal.hxx:1199
MWAWBox2::min
MWAWVec2< T > const & min() const
the minimum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:1039
CricketDrawParserInternal::Shape::m_isSent
bool m_isSent
flag to know if a shape is already sent
Definition: CricketDrawParser.cxx:175
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWGraphicStyle::m_lineDashWidth
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: MWAWGraphicStyle.hxx:506
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
CricketDrawParserInternal::State::State
State()
constructor
Definition: CricketDrawParser.cxx:182
MWAWVec3f
MWAWVec3< float > MWAWVec3f
MWAWVec3 of float.
Definition: libmwaw_internal.hxx:1019
CricketDrawParserInternal::State::getDash
bool getDash(int id, std::vector< float > &dash)
returns a dash corresponding to some id
Definition: CricketDrawParser.cxx:190
CricketDrawParser::send
bool send(CricketDrawParserInternal::Shape const &shape, MWAWTransformation const &transform)
try to send a shape
Definition: CricketDrawParser.cxx:1313
CricketDrawParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: CricketDrawParser.cxx:304
CricketDrawParser::readPrintInfo
bool readPrintInfo()
try to read the print info zone
Definition: CricketDrawParser.cxx:1211
MWAWBox2::size
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
CricketDrawParser::m_state
std::shared_ptr< CricketDrawParserInternal::State > m_state
the state
Definition: CricketDrawParser.hxx:105
CricketDrawParser::~CricketDrawParser
~CricketDrawParser() final
destructor
Definition: CricketDrawParser.cxx:357
CricketDrawParserInternal::Shape::m_text
MWAWEntry m_text
the text entry
Definition: CricketDrawParser.cxx:161
CricketDrawParserInternal::Shape::m_type
Type m_type
the shape type
Definition: CricketDrawParser.cxx:123
MWAWInputStream.hxx
MWAWColor::isWhite
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
MWAWHeader::reset
void reset(MWAWDocument::Type type, int vers, Kind kind=MWAWDocument::MWAW_K_TEXT)
resets the data
Definition: MWAWHeader.hxx:84
MWAWListenerPtr
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
CricketDrawParser::sendBitmap
bool sendBitmap(CricketDrawParserInternal::Shape const &bitmap, MWAWTransformation const &transform)
try to send a bitmap shape
Definition: CricketDrawParser.cxx:1485
MWAWPosition::m_anchorTo
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
CricketDrawParserInternal::Shape::m_id
int m_id
the shape id
Definition: CricketDrawParser.cxx:121
librevenge
Definition: MWAWDocument.hxx:57
CricketDrawParserInternal::Shape
small structure of CricketDrawParserInternal used to stored a shape
Definition: CricketDrawParser.cxx:63
MWAWGraphicStyle::m_rotate
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:544
MWAWPictBitmap.hxx
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
CricketDrawParser
the main class to read a CricketDraw v0,v1 file
Definition: CricketDrawParser.hxx:59
MWAWBox2< float >
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
CricketDrawParserInternal::Shape::GroupEnd
@ GroupEnd
Definition: CricketDrawParser.cxx:66
CricketDrawParserInternal::Shape::Grate
@ Grate
Definition: CricketDrawParser.cxx:66
MWAWBox2::max
MWAWVec2< T > const & max() const
the maximum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:1044
MWAWGraphicShape::PathData
a simple path component
Definition: MWAWGraphicShape.hxx:53
MWAWGraphicStyle::Gradient::G_Radial
@ G_Radial
Definition: MWAWGraphicStyle.hxx:177
CricketDrawParserInternal::Shape::m_shear
float m_shear
the shear angle
Definition: CricketDrawParser.cxx:135
MWAWGraphicStyle::m_shadowOffset
MWAWVec2f m_shadowOffset
the shadow offset
Definition: MWAWGraphicStyle.hxx:527
CricketDrawParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: CricketDrawParser.cxx:301
CricketDrawParser::sendAll
bool sendAll()
try to send the different zones
Definition: CricketDrawParser.cxx:1272
MWAWGraphicShape::rectangle
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:120
CricketDrawParserInternal::Shape::Group
@ Group
Definition: CricketDrawParser.cxx:66
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
CricketDrawParserInternal::Shape::m_bitmapDimension
MWAWBox2i m_bitmapDimension
the bitmap dimension
Definition: CricketDrawParser.cxx:169
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWParser.hxx
CricketDrawParserInternal::Shape::m_bitmapScale
int m_bitmapScale
the bitmap scaling
Definition: CricketDrawParser.cxx:173
MWAWParser::resetGraphicListener
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
MWAWGraphicListener
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60