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 Canvas5 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 
60 {
61 struct Stream;
62 }
63 
64 namespace Canvas5GraphInternal
65 {
66 struct LocalTransform;
67 
68 struct Shape;
69 struct ShapeData;
70 struct State;
71 
72 class SubDocument;
73 }
74 
75 class Canvas5Parser;
76 
83 {
85  friend class Canvas5Parser;
86 
87 public:
89  explicit Canvas5Graph(Canvas5Parser &parser);
91  virtual ~Canvas5Graph();
92 
94  int version() const;
95 
96 protected:
97 
98  // interface with main parser
99 
101  bool sendShape(int sId);
102 
103  //
104  // Intermediate level
105  //
106 
108  bool findShapeDataZones(std::shared_ptr<Canvas5Structure::Stream> stream);
110  bool readShapeData(int id, Canvas5GraphInternal::Shape const &shape);
112  bool readSpecialData(long len, unsigned type, std::string &extra);
114  bool readSpecialData(long len, Canvas5GraphInternal::ShapeData &data, std::string &extra);
116  bool readShapes(Canvas5Structure::Stream &stream, int numShapes);
117 
120 
123 
126 
127  //
128  // send data to the listener
129  //
130 
132  bool sendShape(int sId, Canvas5GraphInternal::LocalTransform const &local);
138 
140  bool sendTextZone(int shapeId);
155 
156  //
157  // Low level
158  //
159 
160 private:
161  Canvas5Graph(Canvas5Graph const &orig) = delete;
162  Canvas5Graph &operator=(Canvas5Graph const &orig) = delete;
163 
164 protected:
165  //
166  // data
167  //
170 
172  std::shared_ptr<Canvas5GraphInternal::State> m_state;
173 
177  std::shared_ptr<Canvas5StyleManager> m_styleManager;
178 };
179 #endif
180 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
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:171
Canvas5GraphInternal::ShapeData::m_shapeIds
unsigned m_shapeIds[4]
the shape ids
Definition: Canvas5Graph.cxx:116
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:71
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
MWAWGraphicStyle::setSurfaceColor
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:487
Canvas5GraphInternal::Shape::m_sent
bool m_sent
a flag to know if the shape is already send
Definition: Canvas5Graph.cxx:237
MWAWGraphicShape::pie
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:147
Canvas5Parser::readExtendedHeader
bool readExtendedHeader(Canvas5Structure::Stream &stream, int expectedValue, std::string const &what, DataFunction const &func)
try to read an extended data header, ie.
Definition: Canvas5Parser.cxx:2119
Canvas5GraphInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: Canvas5Graph.cxx:330
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
Canvas5GraphInternal::SubDocument::SubDocument
SubDocument(Canvas5Graph &parser, MWAWInputStreamPtr const &input, int zoneId)
constructor from a zoneId
Definition: Canvas5Graph.cxx:311
Canvas5GraphInternal::ShapeData::m_children
std::vector< unsigned > m_children
the childs: group
Definition: Canvas5Graph.cxx:121
Canvas5StyleManager::StyleList::m_paragraphs
std::vector< std::pair< MWAWParagraph, int > > m_paragraphs
the paragraph list and the tab id
Definition: Canvas5StyleManager.hxx:93
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:110
MWAWTabStop::CENTER
@ CENTER
Definition: MWAWParagraph.hxx:48
Canvas5GraphInternal::ShapeData::m_grid
MWAWVec2i m_grid
the grid subdivision
Definition: Canvas5Graph.cxx:126
MWAWGraphicShape
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
Canvas5GraphInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: Canvas5Graph.cxx:351
MWAWFontConverter.hxx
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
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:516
Canvas5Graph
the main class to read the graphic part of Canvas5 file
Definition: Canvas5Graph.hxx:83
Canvas5Parser.hxx
Canvas5Graph::m_mainParser
Canvas5Parser * m_mainParser
the main parser;
Definition: Canvas5Graph.hxx:175
Canvas5GraphInternal::Shape::getTypeName
std::string getTypeName() const
returns the type name
Definition: Canvas5Graph.cxx:147
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:235
Canvas5GraphInternal::State::m_posToShapeDataMap
std::map< long, ShapeData > m_posToShapeDataMap
the map id to shape data
Definition: Canvas5Graph.cxx:295
Canvas5GraphInternal::Shape
Internal: the shape of a Canvas5Graph.
Definition: Canvas5Graph.cxx:132
Canvas5Graph::operator=
Canvas5Graph & operator=(Canvas5Graph const &orig)=delete
Canvas5GraphInternal::Shape::m_bdbox
MWAWBox2f m_bdbox
the bounding box
Definition: Canvas5Graph.cxx:229
Canvas5GraphInternal::LocalTransform::m_transform
MWAWTransformation m_transform
Definition: Canvas5Graph.cxx:267
Canvas5Structure::Stream::input
MWAWInputStreamPtr input()
returns the input file
Definition: Canvas5Structure.hxx:62
Canvas5GraphInternal::ShapeData::ShapeData
ShapeData()
Definition: Canvas5Graph.cxx:72
Canvas5GraphInternal::State::m_stream
std::shared_ptr< Canvas5Structure::Stream > m_stream
the shape stream
Definition: Canvas5Graph.cxx:288
Canvas5GraphInternal::SubDocument::m_graphParser
Canvas5Graph & m_graphParser
the graph parser
Definition: Canvas5Graph.cxx:349
Canvas5GraphInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: Canvas5Graph.cxx:361
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:224
MWAWTabStop::DECIMAL
@ DECIMAL
Definition: MWAWParagraph.hxx:48
Canvas5GraphInternal::State::m_sendIdSet
std::set< int > m_sendIdSet
the list of current send id (used to avoid loop)
Definition: Canvas5Graph.cxx:302
Canvas5Graph::sendShape
bool sendShape(int sId)
try to send a shape
Definition: Canvas5Graph.cxx:1288
Canvas5GraphInternal::ShapeData::m_type
unsigned m_type
the shape type
Definition: Canvas5Graph.cxx:108
Canvas5Graph::sendTextZone
bool sendTextZone(int shapeId)
try to send the content of a text zone
Definition: Canvas5Graph.cxx:1770
Canvas5GraphInternal::Shape::m_type
int m_type
the shape type
Definition: Canvas5Graph.cxx:223
Canvas5StyleManager::StyleList::m_fonts
std::vector< std::pair< MWAWFont, int > > m_fonts
the fonts and the paragraph id
Definition: Canvas5StyleManager.hxx:91
MWAWGraphicShape::circle
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
Canvas5Graph::readMatrices
bool readMatrices(Canvas5Structure::Stream &stream)
try to read the different matrix
Definition: Canvas5Graph.cxx:412
Canvas5StyleManager.hxx
MWAWTabStop
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
MWAWSubDocument.hxx
MWAWPosition::size
MWAWVec2f const & size() const
returns the frame size
Definition: MWAWPosition.hxx:135
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
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
Canvas5Graph::readSpecialData
bool readSpecialData(long len, unsigned type, std::string &extra)
try to read a special shape data (internal helper to understand vkfl structure)
Definition: Canvas5Graph.cxx:770
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
Canvas5GraphInternal::State::m_idToObject
std::map< int, MWAWEmbeddedObject > m_idToObject
the map id to bitmap
Definition: Canvas5Graph.cxx:299
MWAWGraphicStyle::emptyStyle
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:473
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:458
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
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
Canvas5Graph::sendDimension
bool sendDimension(Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, Canvas5GraphInternal::LocalTransform const &local)
tries to send the dimension line's special shape: DIMN
Definition: Canvas5Graph.cxx:2482
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:67
Canvas5Structure
a namespace used to define basic structure to read a Canvas 5 file
Definition: Canvas5Graph.hxx:60
M_PI
#define M_PI
Definition: libmwaw_internal.hxx:52
Canvas5Graph::send
bool send(Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::LocalTransform const &local)
try to send a shape with a transformation
Definition: Canvas5Graph.cxx:1310
Canvas5Parser
the main class to read a Canvas 5 files
Definition: Canvas5Parser.hxx:71
Canvas5Graph::readDeR3
bool readDeR3(Canvas5Structure::Stream &stream, Canvas5StyleManager::StyleList &styles)
try to read a complementary styles zone: DeR3
Definition: Canvas5Graph.cxx:906
MWAWGraphicShape::m_type
Type m_type
the type
Definition: MWAWGraphicShape.hxx:222
MWAWVec2< int >
Canvas5StyleManager::StyleList
a structure use to store a list of styles
Definition: Canvas5StyleManager.hxx:83
MWAWGraphicListener.hxx
MWAWPictMac.hxx
MWAWTabStop::m_alignment
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
MWAWGraphicShape.hxx
MWAWDebug.hxx
Canvas5Parser::readDefined
bool readDefined(Canvas5Structure::Stream &stream, std::vector< bool > &defined, std::string const &what)
try to read the defined list
Definition: Canvas5Parser.cxx:2391
MWAWPosition::setOrigin
void setOrigin(MWAWVec2f const &orig)
sets the frame origin
Definition: MWAWPosition.hxx:210
Canvas5Graph::Canvas5Graph
Canvas5Graph(Canvas5Parser &parser)
constructor
Definition: Canvas5Graph.cxx:389
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:333
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
Canvas5GraphInternal::LocalTransform::m_style
MWAWGraphicStyle m_style
Definition: Canvas5Graph.cxx:266
Canvas5Graph::sendExtrude
bool sendExtrude(Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, Canvas5GraphInternal::LocalTransform const &local)
tries to send the extrude's special shape: Extr (pretty basic)
Definition: Canvas5Graph.cxx:2189
Canvas5Graph::~Canvas5Graph
virtual ~Canvas5Graph()
destructor
Definition: Canvas5Graph.cxx:397
MWAWTabStop::m_decimalCharacter
uint16_t m_decimalCharacter
the decimal char
Definition: MWAWParagraph.hxx:80
Canvas5Graph::readShapeData
bool readShapeData(int id, Canvas5GraphInternal::Shape const &shape)
try to read a shape data
Definition: Canvas5Graph.cxx:596
Canvas5GraphInternal::Shape::m_id
int m_id
the shape id
Definition: Canvas5Graph.cxx:225
Canvas5Graph.hxx
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:353
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::getString
static std::string getString(unsigned val)
very low level: debug print some uint32_t either at char4 or sample int
Definition: Canvas5Parser.cxx:2570
Canvas5GraphInternal::ShapeData::m_specials
int m_specials[4]
some special values
Definition: Canvas5Graph.cxx:128
Canvas5GraphInternal::State::m_idToMatrices
std::map< int, std::array< std::array< double, 9 >, 2 > > m_idToMatrices
the map id to matrices
Definition: Canvas5Graph.cxx:297
Canvas5Graph::readBitmaps
bool readBitmaps(Canvas5Structure::Stream &stream)
try to read the second big block: the bitmap
Definition: Canvas5Graph.cxx:1209
Canvas5GraphInternal::SubDocument::operator=
SubDocument & operator=(SubDocument const &orig)=delete
Canvas5GraphInternal::SubDocument
Internal: the subdocument of a Canvas5Graph.
Definition: Canvas5Graph.cxx:308
Canvas5GraphInternal::SubDocument::SubDocument
SubDocument(SubDocument const &orig)=delete
Canvas5Graph::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition: Canvas5Graph.hxx:169
Canvas5GraphInternal::State::State
State()
constructor
Definition: Canvas5Graph.cxx:274
Canvas5GraphInternal::State::m_shapeZones
std::vector< MWAWEntry > m_shapeZones
the shape data zones
Definition: Canvas5Graph.cxx:291
Canvas5GraphInternal::Shape::m_pos
long m_pos
the beginning position
Definition: Canvas5Graph.cxx:231
Canvas5Graph::m_styleManager
std::shared_ptr< Canvas5StyleManager > m_styleManager
the style manager
Definition: Canvas5Graph.hxx:177
MWAWBox2::center
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1072
MWAWGraphicStyle.hxx
Canvas5GraphInternal::SubDocument::m_font
MWAWFont m_font
the font
Definition: Canvas5Graph.cxx:355
MWAWGraphicShape::path
static MWAWGraphicShape path(MWAWBox2f const &box)
static constructor to create a path
Definition: MWAWGraphicShape.hxx:173
Canvas5GraphInternal::LocalTransform
Internal: the local state of a Canvas5Graph.
Definition: Canvas5Graph.cxx:241
Canvas5Graph::version
int version() const
returns the file version
Definition: Canvas5Graph.cxx:401
MWAWTransformation::isIdentity
bool isIdentity() const
returns true if the matrix is an identity matrix
Definition: libmwaw_internal.hxx:1209
Canvas5Parser::readUsed
bool readUsed(Canvas5Structure::Stream &stream, std::string const &what)
try to read the used list
Definition: Canvas5Parser.cxx:2445
Canvas5GraphInternal::State::m_idToShapeMap
std::map< int, Shape > m_idToShapeMap
the map id to shape
Definition: Canvas5Graph.cxx:293
MWAWPosition::Page
@ Page
Definition: MWAWPosition.hxx:51
Canvas5Structure::Stream
a sub stream of Canvas5Structure
Definition: Canvas5Structure.hxx:46
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
Canvas5Graph::sendText
bool sendText(Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data)
try to send a text zone
Definition: Canvas5Graph.cxx:1792
MWAWTransformation
a transformation which stored the first row of a 3x3 perspective matrix
Definition: libmwaw_internal.hxx:1199
Canvas5GraphInternal::LocalTransform::LocalTransform
LocalTransform(MWAWPosition const &pos=MWAWPosition(), MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
default constructor
Definition: Canvas5Graph.cxx:243
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
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
Canvas5Graph::sendEffect
bool sendEffect(Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, Canvas5GraphInternal::LocalTransform const &local)
tries to send the effect's special shape: effe
Definition: Canvas5Graph.cxx:2007
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
Canvas5Graph::sendSpecial
bool sendSpecial(Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, Canvas5GraphInternal::LocalTransform const &local)
try to send a special shape
Definition: Canvas5Graph.cxx:1536
Canvas5GraphInternal::LocalTransform::multiplyMatrix
void multiplyMatrix(std::array< double, 9 > const &mat)
set the matrix transform
Definition: Canvas5Graph.cxx:250
Canvas5Parser::readUnknownHeader
bool readUnknownHeader(Canvas5Structure::Stream &stream, MWAWEntry(&entries)[2], long len, std::string const &what)
try to read an unknown structure which defined some position and two entries
Definition: Canvas5Parser.cxx:2187
Canvas5GraphInternal::Shape::Shape
Shape()
constructor
Definition: Canvas5Graph.cxx:134
MWAWInputStream.hxx
Canvas5GraphInternal::LocalTransform::m_position
MWAWPosition m_position
Definition: Canvas5Graph.cxx:265
Canvas5GraphInternal::SubDocument::SubDocument
SubDocument(Canvas5Graph &parser, MWAWInputStreamPtr const &input, librevenge::RVNGString const &measure, MWAWFont const &font)
constructor from string
Definition: Canvas5Graph.cxx:320
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:112
MWAWTabStop::RIGHT
@ RIGHT
Definition: MWAWParagraph.hxx:48
MWAWBox2< float >
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
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:87
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:2051
Canvas5Graph::m_state
std::shared_ptr< Canvas5GraphInternal::State > m_state
the state
Definition: Canvas5Graph.hxx:172
Canvas5GraphInternal::ShapeData::m_ids
unsigned m_ids[3]
the text link, matrix, name id
Definition: Canvas5Graph.cxx:114
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::Shape::m_initialBox
MWAWBox2f m_initialBox
the original box
Definition: Canvas5Graph.cxx:227
Canvas5GraphInternal::Shape::m_values
int m_values[4]
some unknown value
Definition: Canvas5Graph.cxx:233
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:272
Canvas5Graph::sendCurveText
bool sendCurveText(Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, Canvas5GraphInternal::LocalTransform const &local)
try to send a curve's text zone: CvTe
Definition: Canvas5Graph.cxx:2332
Canvas5Parser::readBitmap
bool readBitmap(Canvas5Structure::Stream &stream, MWAWEmbeddedObject &object, MWAWColor *avgColor=nullptr)
try to read a bitmap
Definition: Canvas5Parser.cxx:1032
Canvas5Parser::readDouble
bool readDouble(Canvas5Structure::Stream &stream, double &val, bool &isNaN) const
try to read a double 8
Definition: Canvas5Parser.cxx:2039
Canvas5GraphInternal::ShapeData::m_vertices
std::vector< MWAWVec2f > m_vertices
the shape vertices: line, ...
Definition: Canvas5Graph.cxx:119
MWAWGraphicStyle::Arrow
a structure used to define an arrow
Definition: MWAWGraphicStyle.hxx:56
Canvas5GraphInternal
Internal: the structures of a Canvas5Graph.
Definition: Canvas5Graph.cxx:69

Generated on Wed Apr 7 2021 00:00:00 for libmwaw by doxygen 1.8.20