Canvas5Graph.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 /*
35  * Parser to Canvas v5-v11 text document ( graphic part )
36  *
37  */
38 #ifndef CANVAS5_GRAPH
39 # define CANVAS5_GRAPH
40 
41 #include <string>
42 #include <utility>
43 #include <vector>
44 
45 #include <librevenge/librevenge.h>
46 
47 #include "libmwaw_internal.hxx"
48 
49 #include "MWAWDebug.hxx"
50 #include "MWAWGraphicStyle.hxx"
51 #include "MWAWInputStream.hxx"
52 #include "MWAWPosition.hxx"
53 
54 #include "Canvas5StyleManager.hxx"
55 
56 class MWAWFont;
57 class MWAWParagraph;
58 
59 namespace Canvas5Structure
60 {
61 struct Stream;
62 }
63 
64 namespace Canvas5GraphInternal
65 {
66 struct Shape;
67 struct ShapeData;
68 struct State;
69 
70 struct PseudoShape;
71 
72 class SubDocument;
73 }
74 
75 class Canvas5Image;
76 
77 class Canvas5Parser;
78 
85 {
87  friend class Canvas5Image;
88  friend class Canvas5Parser;
89 
90 public:
92  explicit Canvas5Graph(Canvas5Parser &parser);
94  virtual ~Canvas5Graph();
95 
97  int version() const;
98 
100  struct LocalState {
103  : m_position(pos)
104  , m_style(style)
105  , m_transform()
106  {
107  }
109  void multiplyMatrix(std::array<double,9> const &mat);
116  };
117 
118 
119 protected:
120 
121  // interface with main parser
122 
124  bool sendShape(int sId);
125 
126  //
127  // Intermediate level
128  //
129 
131  bool findShapeDataZones(std::shared_ptr<Canvas5Structure::Stream> stream);
133  bool readShapeData(int id, Canvas5GraphInternal::Shape const &shape);
135  bool readSpecialData(std::shared_ptr<Canvas5Structure::Stream> stream, long len, Canvas5GraphInternal::ShapeData &data, std::string &extra);
137  std::shared_ptr<Canvas5GraphInternal::PseudoShape> readSpecialData(std::shared_ptr<Canvas5Structure::Stream> stream, long len, unsigned type, MWAWBox2f const &box, std::string &extra);
139  bool readShapes(Canvas5Structure::Stream &stream, int numShapes);
140 
142  bool readMatrices(std::shared_ptr<Canvas5Structure::Stream> stream);
143 
145  bool readDeR3(std::shared_ptr<Canvas5Structure::Stream> stream, Canvas5StyleManager::StyleList &styles);
146 
147  //
148  // send data to the listener
149  //
150 
152  bool sendShape(int sId, LocalState const &local);
154  bool send(Canvas5GraphInternal::Shape const &shape, LocalState const &local);
157  LocalState const &local);
159  bool sendSpecial(MWAWListenerPtr listener, Canvas5GraphInternal::PseudoShape const &pseudoShape, LocalState const &local);
160 
163 
166  LocalState const &local);
169  LocalState const &local);
172  LocalState const &local);
175  LocalState const &local);
178  LocalState const &local);
181  LocalState const &local);
184  LocalState const &local);
185 
186  //
187  // Low level
188  //
189 
191  void send(MWAWListenerPtr listener, MWAWGraphicShape const &shape, MWAWTransformation const &transform,
192  MWAWGraphicStyle const &style);
194  void send(MWAWListenerPtr listener, librevenge::RVNGString const &text, MWAWVec2f const &center,
195  MWAWTransformation const &transform, MWAWFont const &font, bool addFrame);
196 
197 private:
198  Canvas5Graph(Canvas5Graph const &orig) = delete;
199  Canvas5Graph &operator=(Canvas5Graph const &orig) = delete;
200 
201 protected:
202  //
203  // data
204  //
207 
209  std::shared_ptr<Canvas5GraphInternal::State> m_state;
210 
214  std::shared_ptr<Canvas5Image> m_imageParser;
216  std::shared_ptr<Canvas5StyleManager> m_styleManager;
217 };
218 #endif
219 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
Canvas5Image
the main class to read/convert the image or movie inside of Canvas 5-11 files
Definition: Canvas5Image.hxx:78
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
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
Canvas5GraphInternal::Shape::operator<<
friend std::ostream & operator<<(std::ostream &o, Shape const &s)
operator<<
Definition: Canvas5Graph.cxx:221
Canvas5GraphInternal::ShapeData::m_shapeIds
unsigned m_shapeIds[4]
the shape ids
Definition: Canvas5Graph.cxx:154
MWAWGraphicShape::transform
MWAWGraphicShape transform(MWAWTransformation const &matrix) const
returns a new shape corresponding to a matrix transformation
Definition: MWAWGraphicShape.cxx:404
Canvas5GraphInternal::ShapeData
Internal: the shape data.
Definition: Canvas5Graph.cxx:86
Canvas5GraphInternal::ShapeData::m_stream
std::shared_ptr< Canvas5Structure::Stream > m_stream
the data stream
Definition: Canvas5Graph.cxx:144
Canvas5GraphInternal::SubDocument::SubDocument
SubDocument(Canvas5Graph &parser, MWAWInputStreamPtr const &input, Shape const &shape, ShapeData const &data)
constructor from a zoneId
Definition: Canvas5Graph.cxx:352
Canvas5Graph::sendGIF
bool sendGIF(MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
tries to send the gif's shape: AnGf (v7)
Definition: Canvas5Graph.cxx:2869
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
Canvas5Graph::sendText
bool sendText(MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data)
try to send a text zone
Definition: Canvas5Graph.cxx:2399
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
Canvas5GraphInternal::ShapeData::m_gdeType
int m_gdeType
the #Gde type
Definition: Canvas5Graph.cxx:174
Canvas5Parser::isWindowsFile
bool isWindowsFile() const
returns true if the file is a windows file
Definition: Canvas5Parser.cxx:202
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
Canvas5Parser::Item::m_id
int m_id
the identifier
Definition: Canvas5Parser.hxx:195
MWAWGraphicStyle::setSurfaceColor
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:487
Canvas5GraphInternal::ShapeData::m_macoId
std::vector< unsigned > m_macoId
the macro Id: MACO
Definition: Canvas5Graph.cxx:161
Canvas5GraphInternal::Shape::m_sent
bool m_sent
a flag to know if the shape is already send
Definition: Canvas5Graph.cxx:287
MWAWGraphicShape::pie
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:147
Canvas5GraphInternal::PseudoShape
Internal[low level]: a pseudo class to store the data corresponding to a shape.
Definition: Canvas5Graph.cxx:291
Canvas5GraphInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: Canvas5Graph.cxx:373
MWAWGraphicShape::m_path
std::vector< PathData > m_path
the list of path component
Definition: MWAWGraphicShape.hxx:234
Canvas5Graph::Canvas5Graph
Canvas5Graph(Canvas5Graph const &orig)=delete
MWAWFont::id
int id() const
returns the font id
Definition: MWAWFont.hxx:259
MWAWGraphicStyle::Arrow::plain
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
MWAWFont::boldBit
@ boldBit
Definition: MWAWFont.hxx:190
MWAWGraphicStyle::m_surfaceOpacity
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:597
Canvas5GraphInternal::ShapeData::m_children
std::vector< unsigned > m_children
the childs: group
Definition: Canvas5Graph.cxx:159
Canvas5StyleManager::StyleList::m_paragraphs
std::vector< std::pair< MWAWParagraph, int > > m_paragraphs
the paragraph list and the tab id
Definition: Canvas5StyleManager.hxx:119
MWAWColor::white
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
Canvas5GraphInternal::ShapeData::m_entry
MWAWEntry m_entry
the shape data entry
Definition: Canvas5Graph.cxx:148
MWAWTabStop::CENTER
@ CENTER
Definition: MWAWParagraph.hxx:48
Canvas5GraphInternal::PseudoShape::m_shape
Shape m_shape
the shape
Definition: Canvas5Graph.cxx:300
Canvas5GraphInternal::ShapeData::m_grid
MWAWVec2i m_grid
the grid subdivision
Definition: Canvas5Graph.cxx:166
MWAWGraphicShape
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
Canvas5Graph::send
bool send(Canvas5GraphInternal::Shape const &shape, LocalState const &local)
try to send a shape with a transformation
Definition: Canvas5Graph.cxx:1751
MWAWFontConverter.hxx
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
libmwaw::appendUnicode
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
Canvas5GraphInternal::State::m_dataStreamReverted
bool m_dataStreamReverted
a flag to retrieved the data shape entry
Definition: Canvas5Graph.cxx:327
MWAWGraphicShape::line
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
Canvas5Graph::readShapes
bool readShapes(Canvas5Structure::Stream &stream, int numShapes)
try to read the different shapes
Definition: Canvas5Graph.cxx:598
Canvas5Graph
the main class to read the graphic part of Canvas v5-v11 file
Definition: Canvas5Graph.hxx:85
Canvas5Parser.hxx
Canvas5Graph::m_mainParser
Canvas5Parser * m_mainParser
the main parser;
Definition: Canvas5Graph.hxx:212
Canvas5GraphInternal::Shape::getTypeName
std::string getTypeName() const
returns the type name
Definition: Canvas5Graph.cxx:197
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
Canvas5GraphInternal::Shape::m_flags
int m_flags[3]
some unknown flag
Definition: Canvas5Graph.cxx:285
Canvas5GraphInternal::State::m_posToShapeDataMap
std::map< long, ShapeData > m_posToShapeDataMap
the map id to shape data
Definition: Canvas5Graph.cxx:334
Canvas5GraphInternal::Shape
Internal: the shape of a Canvas5Graph.
Definition: Canvas5Graph.cxx:182
MWAWFont::Line::Simple
@ Simple
Definition: MWAWFont.hxx:49
Canvas5Graph::operator=
Canvas5Graph & operator=(Canvas5Graph const &orig)=delete
Canvas5GraphInternal::Shape::m_bdbox
MWAWBox2f m_bdbox
the bounding box
Definition: Canvas5Graph.cxx:279
Canvas5Structure::Stream::input
MWAWInputStreamPtr input()
returns the input file
Definition: Canvas5Structure.hxx:65
Canvas5GraphInternal::ShapeData::ShapeData
ShapeData()
constructor
Definition: Canvas5Graph.cxx:88
Canvas5GraphInternal::SubDocument::m_graphParser
Canvas5Graph & m_graphParser
the graph parser
Definition: Canvas5Graph.cxx:393
Canvas5GraphInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: Canvas5Graph.cxx:407
MWAWBox2::setMin
void setMin(MWAWVec2< T > const &x)
resets the minimum point
Definition: libmwaw_internal.hxx:1085
Canvas5GraphInternal::SectionData::m_bdBox
MWAWBox2f m_bdBox
the bounding box
Definition: Canvas5Graph.cxx:82
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
Canvas5Graph::LocalState::m_transform
MWAWTransformation m_transform
the shape transformation
Definition: Canvas5Graph.hxx:115
Canvas5StyleManager::StyleList::m_fonts
std::vector< CharStyle > m_fonts
the fonts, the paragraph id and the link id
Definition: Canvas5StyleManager.hxx:117
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:224
MWAWTabStop::DECIMAL
@ DECIMAL
Definition: MWAWParagraph.hxx:48
Canvas5GraphInternal::State::m_sendIdSet
std::set< int > m_sendIdSet
the list of current send shape id (used to avoid loop)
Definition: Canvas5Graph.cxx:339
Canvas5Graph::sendShape
bool sendShape(int sId)
try to send a shape
Definition: Canvas5Graph.cxx:1689
Canvas5GraphInternal::ShapeData::m_type
unsigned m_type
the shape type
Definition: Canvas5Graph.cxx:142
Canvas5GraphInternal::Shape::m_type
int m_type
the shape type
Definition: Canvas5Graph.cxx:273
Canvas5GraphInternal::ShapeData::m_doubleValues
double m_doubleValues[4]
the arc angles or rect oval size: v9
Definition: Canvas5Graph.cxx:178
MWAWFont::embossBit
@ embossBit
Definition: MWAWFont.hxx:190
MWAWGraphicShape::circle
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
Canvas5StyleManager.hxx
Canvas5Graph::m_imageParser
std::shared_ptr< Canvas5Image > m_imageParser
the image parser
Definition: Canvas5Graph.hxx:214
Canvas5Graph::sendExtrude
bool sendExtrude(MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
tries to send the extrude's special shape: Extr (pretty basic)
Definition: Canvas5Graph.cxx:2734
MWAWTabStop
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
MWAWFont::setStrikeOutStyle
void setStrikeOutStyle(Line::Style style=Line::None, bool doReset=true)
sets the strikeoutline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:427
MWAWSubDocument.hxx
Canvas5GraphInternal::SectionData::SectionData
SectionData()
constructor
Definition: Canvas5Graph.cxx:74
MWAWPosition::size
MWAWVec2f const & size() const
returns the frame size
Definition: MWAWPosition.hxx:135
Canvas5Parser::Item::m_pos
long m_pos
the data beginning position (may be before the current position: v9)
Definition: Canvas5Parser.hxx:201
MWAWGraphicShape::Polygon
@ Polygon
Definition: MWAWGraphicShape.hxx:49
MWAWGraphicShape::polygon
static MWAWGraphicShape polygon(MWAWBox2f const &box)
static constructor to create a polygon
Definition: MWAWGraphicShape.hxx:165
Canvas5GraphInternal::ShapeData::getStream
Canvas5Structure::Stream & getStream() const
returns the data stream
Definition: Canvas5Graph.cxx:112
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
Canvas5Graph::sendTechnical
bool sendTechnical(MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
tries to send the technical shape: Tech (v7)
Definition: Canvas5Graph.cxx:2972
MWAWGraphicStyle::emptyStyle
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:473
Canvas5Parser::readArray9
bool readArray9(std::shared_ptr< Canvas5Structure::Stream > stream, std::string const &what, DataFunction const &func=&Canvas5Parser::defDataFunction)
try to read an array: v9
Definition: Canvas5Parser.cxx:3357
Canvas5GraphInternal::State::m_sendAGIFIdSet
std::set< int > m_sendAGIFIdSet
the list of current send GIF id (used to avoid loop)
Definition: Canvas5Graph.cxx:341
MWAWFont::shadowBit
@ shadowBit
Definition: MWAWFont.hxx:191
Canvas5Graph::LocalState::m_style
MWAWGraphicStyle m_style
the shape style
Definition: Canvas5Graph.hxx:113
MWAWParagraph.hxx
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
Canvas5Graph::findShapeDataZones
bool findShapeDataZones(std::shared_ptr< Canvas5Structure::Stream > stream)
try to find the list of data's shape zones
Definition: Canvas5Graph.cxx:539
libmwaw::Debug::dumpFile
bool dumpFile(librevenge::RVNGBinaryData &data, char const *fileName)
a debug function to store in a datafile in the current directory WARNING: this function erase the fil...
Definition: MWAWDebug.cxx:193
libmwaw_internal.hxx
MWAWGraphicStyle::m_lineWidth
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:585
MWAWPosition.hxx
MWAWPosition::setSize
void setSize(MWAWVec2f const &sz)
sets the frame size
Definition: MWAWPosition.hxx:215
Canvas5Graph::LocalState::multiplyMatrix
void multiplyMatrix(std::array< double, 9 > const &mat)
set the matrix transform
Definition: Canvas5Graph.cxx:4292
MWAWGraphicShape::offsetVertices
static std::vector< PathData > offsetVertices(std::vector< PathData > const &path, float offset, MWAWBox2f &finalBox)
try to decal each path point by an offset (using their normal)
Definition: MWAWGraphicShape.cxx:759
Canvas5GraphInternal::SectionData
Internal: the section data.
Definition: Canvas5Graph.cxx:72
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
MWAWGraphicShape::m_vertices
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:232
Canvas5Structure::Stream::ascii
libmwaw::DebugFile & ascii()
return the ascii file
Definition: Canvas5Structure.hxx:70
Canvas5Graph::sendEffect
bool sendEffect(MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
tries to send the effect's special shape: effe
Definition: Canvas5Graph.cxx:2677
Canvas5Structure
a namespace used to define basic function or structure to read a Canvas v5-v11 file
Definition: Canvas5BMParser.hxx:64
M_PI
#define M_PI
Definition: libmwaw_internal.hxx:52
Canvas5Parser
the main class to read a Canvas 5-10 files (and probably some not password protected Windows 11 files...
Definition: Canvas5Parser.hxx:72
Canvas5GraphInternal::intersect
bool intersect(MWAWVec2f const &A, MWAWVec2f const &dirA, MWAWVec2f const &B, MWAWVec2f const &dirB, MWAWVec2f &pt)
Definition: Canvas5Graph.cxx:3684
MWAWGraphicShape::m_type
Type m_type
the type
Definition: MWAWGraphicShape.hxx:222
Canvas5Graph::LocalState::LocalState
LocalState(MWAWPosition const &pos=MWAWPosition(), MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
default constructor
Definition: Canvas5Graph.hxx:102
MWAWVec2< int >
Canvas5Graph::readMatrices
bool readMatrices(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the different matrix
Definition: Canvas5Graph.cxx:459
Canvas5StyleManager::StyleList
a structure use to store a list of styles
Definition: Canvas5StyleManager.hxx:109
MWAWBox2::setMax
void setMax(MWAWVec2< T > const &y)
resets the maximum point
Definition: libmwaw_internal.hxx:1090
MWAWGraphicListener.hxx
Canvas5GraphInternal::ShapeData::m_ngonType
int m_ngonType
the n-polygon type: NGON
Definition: Canvas5Graph.cxx:172
MWAWPictMac.hxx
MWAWTabStop::m_alignment
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
MWAWGraphicShape.hxx
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
MWAWDebug.hxx
Canvas5GraphInternal::SubDocument::m_data
ShapeData const * m_data
the shape data
Definition: Canvas5Graph.cxx:397
MWAWFont::getDebugString
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
MWAWPosition::setOrigin
void setOrigin(MWAWVec2f const &orig)
sets the frame origin
Definition: MWAWPosition.hxx:210
Canvas5Graph::Canvas5Graph
Canvas5Graph(Canvas5Parser &parser)
constructor
Definition: Canvas5Graph.cxx:435
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MWAWGraphicShape::Polyline
@ Polyline
Definition: MWAWGraphicShape.hxx:49
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
Canvas5Structure.hxx
Canvas5GraphInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: Canvas5Graph.cxx:376
MWAWGraphicStyle::m_arrows
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:632
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
MWAWTabStop::m_position
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
MWAWFont::setId
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
Canvas5Graph::~Canvas5Graph
virtual ~Canvas5Graph()
destructor
Definition: Canvas5Graph.cxx:444
MWAWTabStop::m_decimalCharacter
uint16_t m_decimalCharacter
the decimal char
Definition: MWAWParagraph.hxx:80
Canvas5Parser::readInteger
int readInteger(Canvas5Structure::Stream &stream, int fieldSize) const
try to read a int: either a cast a double: fieldSize=8 or a int32/int16
Definition: Canvas5Parser.cxx:2906
Canvas5Graph::readShapeData
bool readShapeData(int id, Canvas5GraphInternal::Shape const &shape)
try to read a shape data
Definition: Canvas5Graph.cxx:686
Canvas5GraphInternal::Shape::m_id
int m_id
the shape id
Definition: Canvas5Graph.cxx:275
Canvas5Parser::readExtendedHeader
bool readExtendedHeader(std::shared_ptr< Canvas5Structure::Stream > stream, int expectedValue, std::string const &what, DataFunction const &func)
try to read an extended data header, ie.
Definition: Canvas5Parser.cxx:3039
Canvas5Graph.hxx
Canvas5GraphInternal::ShapeData::m_inMainZone
bool m_inMainZone
a flag to know if the shape is in the main zone or in Vkfl
Definition: Canvas5Graph.cxx:140
MWAWGraphicShape::arc
static MWAWGraphicShape arc(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:137
Canvas5GraphInternal::SubDocument::m_measure
librevenge::RVNGString m_measure
the measure
Definition: Canvas5Graph.cxx:399
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
Canvas5Parser::Item
a structure used to store the item data of a Canvas5Parser
Definition: Canvas5Parser.hxx:183
Canvas5GraphInternal::SubDocument::m_shape
Shape const * m_shape
the shape
Definition: Canvas5Graph.cxx:395
Canvas5GraphInternal::ShapeData::m_specials
int m_specials[4]
some special values
Definition: Canvas5Graph.cxx:168
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWFont::setSize
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MWAWGraphicStyle::m_lineColor
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:593
Canvas5GraphInternal::State::m_idToMatrices
std::map< int, std::array< std::array< double, 9 >, 2 > > m_idToMatrices
the map id to matrices
Definition: Canvas5Graph.cxx:336
Canvas5GraphInternal::SubDocument::operator=
SubDocument & operator=(SubDocument const &orig)=delete
Canvas5GraphInternal::SubDocument
Internal: the subdocument of a Canvas5Graph.
Definition: Canvas5Graph.cxx:349
Canvas5GraphInternal::SubDocument::SubDocument
SubDocument(SubDocument const &orig)=delete
Canvas5Graph::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition: Canvas5Graph.hxx:206
Canvas5GraphInternal::State::State
State()
constructor
Definition: Canvas5Graph.cxx:309
Canvas5GraphInternal::ShapeData::m_cweb
MWAWEntry m_cweb[3]
the buttons image entries
Definition: Canvas5Graph.cxx:170
Canvas5GraphInternal::State::m_shapeZones
std::vector< MWAWEntry > m_shapeZones
the shape data zones
Definition: Canvas5Graph.cxx:330
Canvas5GraphInternal::Shape::m_pos
long m_pos
the beginning position
Definition: Canvas5Graph.cxx:281
Canvas5Graph::LocalState::m_position
MWAWPosition m_position
the shape position position
Definition: Canvas5Graph.hxx:111
Canvas5Graph::m_styleManager
std::shared_ptr< Canvas5StyleManager > m_styleManager
the style manager
Definition: Canvas5Graph.hxx:216
MWAWBox2::center
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1072
MWAWGraphicStyle.hxx
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:190
Canvas5Structure::getString
std::string getString(unsigned val)
very low level: debug print some uint32_t either at char4 or sample int
Definition: Canvas5Structure.cxx:47
Canvas5GraphInternal::SubDocument::m_font
MWAWFont m_font
the font
Definition: Canvas5Graph.cxx:401
Canvas5Graph::sendCurveText
bool sendCurveText(MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
try to send a curve's text zone: CvTe
Definition: Canvas5Graph.cxx:3257
Canvas5GraphInternal::State::m_sendMACOIdSet
std::set< std::vector< unsigned > > m_sendMACOIdSet
the list of current send macro id (used to avoid loop)
Definition: Canvas5Graph.cxx:343
MWAWGraphicShape::path
static MWAWGraphicShape path(MWAWBox2f const &box)
static constructor to create a path
Definition: MWAWGraphicShape.hxx:173
Canvas5Graph::version
int version() const
returns the file version
Definition: Canvas5Graph.cxx:448
MWAWTransformation::isIdentity
bool isIdentity() const
returns true if the matrix is an identity matrix
Definition: libmwaw_internal.hxx:1209
Canvas5Parser::Item::m_length
long m_length
the data length (from current position)
Definition: Canvas5Parser.hxx:199
Canvas5Parser::readUsed
bool readUsed(Canvas5Structure::Stream &stream, std::string const &what)
try to read the used list
Definition: Canvas5Parser.cxx:3300
Canvas5GraphInternal::State::m_idToShapeMap
std::map< int, Shape > m_idToShapeMap
the map id to shape
Definition: Canvas5Graph.cxx:332
MWAWPosition::Page
@ Page
Definition: MWAWPosition.hxx:51
Canvas5Graph::sendDimension9
bool sendDimension9(MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
tries to send the dimension line's special shape: DIMN: v9
Definition: Canvas5Graph.cxx:3731
Canvas5Structure::Stream
a sub stream of Canvas5Structure
Definition: Canvas5Structure.hxx:49
MWAWParagraph::JustificationFull
@ JustificationFull
Definition: MWAWParagraph.hxx:90
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:91
MWAWParserStatePtr
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
MWAWTransformation
a transformation which stored the first row of a 3x3 perspective matrix
Definition: libmwaw_internal.hxx:1199
Canvas5Graph::sendDimension
bool sendDimension(MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
tries to send the dimension line's special shape: DIMN
Definition: Canvas5Graph.cxx:3415
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWBox2::resizeFromCenter
void resizeFromCenter(MWAWVec2< T > const &sz)
resize the box keeping the center
Definition: libmwaw_internal.hxx:1106
MWAWPosition::origin
MWAWVec2f const & origin() const
return the frame origin
Definition: MWAWPosition.hxx:130
MWAW_N_ELEMENTS
#define MWAW_N_ELEMENTS(m)
Definition: libmwaw_internal.hxx:111
MWAWVec3f
MWAWVec3< float > MWAWVec3f
MWAWVec3 of float.
Definition: libmwaw_internal.hxx:1019
MWAWListener.hxx
MWAWBox2::size
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
MWAWGraphicShape::polyline
static MWAWGraphicShape polyline(MWAWBox2f const &box)
static constructor to create a polyline
Definition: MWAWGraphicShape.hxx:157
MWAWGraphicShape::getPath
std::vector< PathData > getPath(bool forTransformation) const
return a path corresponding to the shape
Definition: MWAWGraphicShape.cxx:597
libmwaw::DebugFile
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
Canvas5GraphInternal::Shape::Shape
Shape()
constructor
Definition: Canvas5Graph.cxx:184
Canvas5Graph::sendSpecial
bool sendSpecial(MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
try to send a special shape
Definition: Canvas5Graph.cxx:1996
MWAWInputStream.hxx
Canvas5Image.hxx
Canvas5GraphInternal::SubDocument::SubDocument
SubDocument(Canvas5Graph &parser, MWAWInputStreamPtr const &input, librevenge::RVNGString const &measure, MWAWFont const &font)
constructor from string
Definition: Canvas5Graph.cxx:362
MWAWListenerPtr
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
MWAWFont.hxx
MWAWPosition::m_anchorTo
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
MWAWGraphicStyle::m_rotate
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:623
MWAWPictBitmap.hxx
Canvas5GraphInternal::ShapeData::m_local
int m_local[2]
the local variable
Definition: Canvas5Graph.cxx:150
MWAWTabStop::RIGHT
@ RIGHT
Definition: MWAWParagraph.hxx:48
Canvas5GraphInternal::State::m_dataStream
std::shared_ptr< Canvas5Structure::Stream > m_dataStream
the data shape stream
Definition: Canvas5Graph.cxx:325
MWAWBox2< float >
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
Canvas5Parser::getTextLink
librevenge::RVNGString getTextLink(int textLinkId) const
returns the link corresponding to a text id
Definition: Canvas5Parser.cxx:208
MWAWGraphicShape::PathData
a simple path component
Definition: MWAWGraphicShape.hxx:53
Canvas5GraphInternal::ShapeData::operator<<
friend std::ostream & operator<<(std::ostream &o, ShapeData const &s)
operator<<
Definition: Canvas5Graph.cxx:122
Canvas5Parser::readString
bool readString(Canvas5Structure::Stream &stream, librevenge::RVNGString &string, int maxSize, bool canBeCString=false)
try to read a pascal string in the data fork or a Pascal/C string depending on the file type
Definition: Canvas5Parser.cxx:2971
Canvas5GraphInternal::PseudoShape::PseudoShape
PseudoShape()
constructor
Definition: Canvas5Graph.cxx:293
Canvas5Graph::readDeR3
bool readDeR3(std::shared_ptr< Canvas5Structure::Stream > stream, Canvas5StyleManager::StyleList &styles)
try to read a complementary styles zone: DeR3
Definition: Canvas5Graph.cxx:1370
Canvas5Graph::m_state
std::shared_ptr< Canvas5GraphInternal::State > m_state
the state
Definition: Canvas5Graph.hxx:209
Canvas5GraphInternal::ShapeData::m_ids
unsigned m_ids[3]
the text link, matrix, name id
Definition: Canvas5Graph.cxx:152
MWAWGraphicStyle::hasSurface
bool hasSurface() const
returns true if the interior surface is defined
Definition: MWAWGraphicStyle.hxx:519
MWAWGraphicShape::rectangle
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:120
Canvas5GraphInternal::PseudoShape::m_data
ShapeData m_data
the data shape
Definition: Canvas5Graph.cxx:302
Canvas5GraphInternal::ShapeData::m_sections
std::vector< SectionData > m_sections
the sections: #Gde
Definition: Canvas5Graph.cxx:176
Canvas5GraphInternal::ShapeData::m_streamReverted
bool m_streamReverted
a flag to know the stream endian
Definition: Canvas5Graph.cxx:146
Canvas5Graph::readSpecialData
bool readSpecialData(std::shared_ptr< Canvas5Structure::Stream > stream, long len, Canvas5GraphInternal::ShapeData &data, std::string &extra)
try to read a special shape data
Definition: Canvas5Graph.cxx:908
Canvas5GraphInternal::Shape::m_initialBox
MWAWBox2f m_initialBox
the original box
Definition: Canvas5Graph.cxx:277
Canvas5GraphInternal::Shape::m_values
int m_values[4]
some unknown value
Definition: Canvas5Graph.cxx:283
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWParser.hxx
Canvas5GraphInternal::State
Internal: the state of a Canvas5Graph.
Definition: Canvas5Graph.cxx:307
MWAWFont::setUnderlineStyle
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
Canvas5GraphInternal::SectionData::m_numColumns
int m_numColumns
the number of columns
Definition: Canvas5Graph.cxx:80
Canvas5Graph::LocalState
Internal: the local state of a Canvas5Graph.
Definition: Canvas5Graph.hxx:100
MWAWFont::setFlags
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Canvas5Parser::readDouble
bool readDouble(Canvas5Structure::Stream &stream, double &val, bool &isNaN) const
try to read a double 8
Definition: Canvas5Parser.cxx:2959
Canvas5GraphInternal::ShapeData::m_vertices
std::vector< MWAWVec2f > m_vertices
the shape vertices: line, ...
Definition: Canvas5Graph.cxx:157
MWAWGraphicStyle::Arrow
a structure used to define an arrow
Definition: MWAWGraphicStyle.hxx:56
Canvas5GraphInternal
Internal: the structures of a Canvas5Graph.
Definition: Canvas5Graph.cxx:70

Generated on Mon Jul 26 2021 00:00:00 for libmwaw by doxygen 1.8.20