Go to the documentation of this file.
39 # define CANVAS5_GRAPH
45 #include <librevenge/librevenge.h>
66 struct LocalTransform;
172 std::shared_ptr<Canvas5GraphInternal::State>
m_state;
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
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
friend std::ostream & operator<<(std::ostream &o, Shape const &s)
operator<<
Definition: Canvas5Graph.cxx:171
unsigned m_shapeIds[4]
the shape ids
Definition: Canvas5Graph.cxx:116
MWAWGraphicShape transform(MWAWTransformation const &matrix) const
returns a new shape corresponding to a matrix transformation
Definition: MWAWGraphicShape.cxx:404
Internal: the shape data.
Definition: Canvas5Graph.cxx:71
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
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:487
bool m_sent
a flag to know if the shape is already send
Definition: Canvas5Graph.cxx:237
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:147
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
~SubDocument() final
destructor
Definition: Canvas5Graph.cxx:330
std::vector< PathData > m_path
the list of path component
Definition: MWAWGraphicShape.hxx:234
Canvas5Graph(Canvas5Graph const &orig)=delete
int id() const
returns the font id
Definition: MWAWFont.hxx:259
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
SubDocument(Canvas5Graph &parser, MWAWInputStreamPtr const &input, int zoneId)
constructor from a zoneId
Definition: Canvas5Graph.cxx:311
std::vector< unsigned > m_children
the childs: group
Definition: Canvas5Graph.cxx:121
std::vector< std::pair< MWAWParagraph, int > > m_paragraphs
the paragraph list and the tab id
Definition: Canvas5StyleManager.hxx:93
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
MWAWEntry m_entry
the shape data entry
Definition: Canvas5Graph.cxx:110
@ CENTER
Definition: MWAWParagraph.hxx:48
MWAWVec2i m_grid
the grid subdivision
Definition: Canvas5Graph.cxx:126
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
int m_id
the subdocument id
Definition: Canvas5Graph.cxx:351
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
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
bool readShapes(Canvas5Structure::Stream &stream, int numShapes)
try to read the different shapes
Definition: Canvas5Graph.cxx:516
the main class to read the graphic part of Canvas5 file
Definition: Canvas5Graph.hxx:83
Canvas5Parser * m_mainParser
the main parser;
Definition: Canvas5Graph.hxx:175
std::string getTypeName() const
returns the type name
Definition: Canvas5Graph.cxx:147
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
int m_flags[3]
some unknown flag
Definition: Canvas5Graph.cxx:235
std::map< long, ShapeData > m_posToShapeDataMap
the map id to shape data
Definition: Canvas5Graph.cxx:295
Internal: the shape of a Canvas5Graph.
Definition: Canvas5Graph.cxx:132
Canvas5Graph & operator=(Canvas5Graph const &orig)=delete
MWAWBox2f m_bdbox
the bounding box
Definition: Canvas5Graph.cxx:229
MWAWInputStreamPtr input()
returns the input file
Definition: Canvas5Structure.hxx:62
ShapeData()
Definition: Canvas5Graph.cxx:72
std::shared_ptr< Canvas5Structure::Stream > m_stream
the shape stream
Definition: Canvas5Graph.cxx:288
Canvas5Graph & m_graphParser
the graph parser
Definition: Canvas5Graph.cxx:349
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: Canvas5Graph.cxx:361
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:224
@ DECIMAL
Definition: MWAWParagraph.hxx:48
std::set< int > m_sendIdSet
the list of current send id (used to avoid loop)
Definition: Canvas5Graph.cxx:302
bool sendShape(int sId)
try to send a shape
Definition: Canvas5Graph.cxx:1288
unsigned m_type
the shape type
Definition: Canvas5Graph.cxx:108
bool sendTextZone(int shapeId)
try to send the content of a text zone
Definition: Canvas5Graph.cxx:1770
int m_type
the shape type
Definition: Canvas5Graph.cxx:223
std::vector< std::pair< MWAWFont, int > > m_fonts
the fonts and the paragraph id
Definition: Canvas5StyleManager.hxx:91
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
bool readMatrices(Canvas5Structure::Stream &stream)
try to read the different matrix
Definition: Canvas5Graph.cxx:412
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
MWAWVec2f const & size() const
returns the frame size
Definition: MWAWPosition.hxx:135
@ Polygon
Definition: MWAWGraphicShape.hxx:49
static MWAWGraphicShape polygon(MWAWBox2f const &box)
static constructor to create a polygon
Definition: MWAWGraphicShape.hxx:165
SubDocumentType
Definition: libmwaw_internal.hxx:188
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
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
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
std::map< int, MWAWEmbeddedObject > m_idToObject
the map id to bitmap
Definition: Canvas5Graph.cxx:299
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:473
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
bool findShapeDataZones(std::shared_ptr< Canvas5Structure::Stream > stream)
try to find the list of data's shape zones
Definition: Canvas5Graph.cxx:458
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:585
void setSize(MWAWVec2f const &sz)
sets the frame size
Definition: MWAWPosition.hxx:215
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
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
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:232
libmwaw::DebugFile & ascii()
return the ascii file
Definition: Canvas5Structure.hxx:67
a namespace used to define basic structure to read a Canvas 5 file
Definition: Canvas5Graph.hxx:60
#define M_PI
Definition: libmwaw_internal.hxx:52
bool send(Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::LocalTransform const &local)
try to send a shape with a transformation
Definition: Canvas5Graph.cxx:1310
the main class to read a Canvas 5 files
Definition: Canvas5Parser.hxx:71
bool readDeR3(Canvas5Structure::Stream &stream, Canvas5StyleManager::StyleList &styles)
try to read a complementary styles zone: DeR3
Definition: Canvas5Graph.cxx:906
Type m_type
the type
Definition: MWAWGraphicShape.hxx:222
a structure use to store a list of styles
Definition: Canvas5StyleManager.hxx:83
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
bool readDefined(Canvas5Structure::Stream &stream, std::vector< bool > &defined, std::string const &what)
try to read the defined list
Definition: Canvas5Parser.cxx:2391
void setOrigin(MWAWVec2f const &orig)
sets the frame origin
Definition: MWAWPosition.hxx:210
Canvas5Graph(Canvas5Parser &parser)
constructor
Definition: Canvas5Graph.cxx:389
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
@ Polyline
Definition: MWAWGraphicShape.hxx:49
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: Canvas5Graph.cxx:333
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:632
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
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
virtual ~Canvas5Graph()
destructor
Definition: Canvas5Graph.cxx:397
uint16_t m_decimalCharacter
the decimal char
Definition: MWAWParagraph.hxx:80
bool readShapeData(int id, Canvas5GraphInternal::Shape const &shape)
try to read a shape data
Definition: Canvas5Graph.cxx:596
int m_id
the shape id
Definition: Canvas5Graph.cxx:225
static MWAWGraphicShape arc(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:137
librevenge::RVNGString m_measure
the measure
Definition: Canvas5Graph.cxx:353
static std::string getString(unsigned val)
very low level: debug print some uint32_t either at char4 or sample int
Definition: Canvas5Parser.cxx:2570
int m_specials[4]
some special values
Definition: Canvas5Graph.cxx:128
std::map< int, std::array< std::array< double, 9 >, 2 > > m_idToMatrices
the map id to matrices
Definition: Canvas5Graph.cxx:297
bool readBitmaps(Canvas5Structure::Stream &stream)
try to read the second big block: the bitmap
Definition: Canvas5Graph.cxx:1209
SubDocument & operator=(SubDocument const &orig)=delete
Internal: the subdocument of a Canvas5Graph.
Definition: Canvas5Graph.cxx:308
SubDocument(SubDocument const &orig)=delete
MWAWParserStatePtr m_parserState
the parser state
Definition: Canvas5Graph.hxx:169
State()
constructor
Definition: Canvas5Graph.cxx:274
std::vector< MWAWEntry > m_shapeZones
the shape data zones
Definition: Canvas5Graph.cxx:291
long m_pos
the beginning position
Definition: Canvas5Graph.cxx:231
std::shared_ptr< Canvas5StyleManager > m_styleManager
the style manager
Definition: Canvas5Graph.hxx:177
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1072
MWAWFont m_font
the font
Definition: Canvas5Graph.cxx:355
static MWAWGraphicShape path(MWAWBox2f const &box)
static constructor to create a path
Definition: MWAWGraphicShape.hxx:173
int version() const
returns the file version
Definition: Canvas5Graph.cxx:401
bool readUsed(Canvas5Structure::Stream &stream, std::string const &what)
try to read the used list
Definition: Canvas5Parser.cxx:2445
std::map< int, Shape > m_idToShapeMap
the map id to shape
Definition: Canvas5Graph.cxx:293
@ Page
Definition: MWAWPosition.hxx:51
a sub stream of Canvas5Structure
Definition: Canvas5Structure.hxx:46
@ JustificationFull
Definition: MWAWParagraph.hxx:90
@ JustificationRight
Definition: MWAWParagraph.hxx:91
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
bool sendText(Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data)
try to send a text zone
Definition: Canvas5Graph.cxx:1792
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWVec2f const & origin() const
return the frame origin
Definition: MWAWPosition.hxx:130
#define MWAW_N_ELEMENTS(m)
Definition: libmwaw_internal.hxx:111
MWAWVec3< float > MWAWVec3f
MWAWVec3 of float.
Definition: libmwaw_internal.hxx:1019
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
static MWAWGraphicShape polyline(MWAWBox2f const &box)
static constructor to create a polyline
Definition: MWAWGraphicShape.hxx:157
std::vector< PathData > getPath(bool forTransformation) const
return a path corresponding to the shape
Definition: MWAWGraphicShape.cxx:597
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
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
bool sendSpecial(Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, Canvas5GraphInternal::LocalTransform const &local)
try to send a special shape
Definition: Canvas5Graph.cxx:1536
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
Shape()
constructor
Definition: Canvas5Graph.cxx:134
SubDocument(Canvas5Graph &parser, MWAWInputStreamPtr const &input, librevenge::RVNGString const &measure, MWAWFont const &font)
constructor from string
Definition: Canvas5Graph.cxx:320
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:623
int m_local[2]
the local variable
Definition: Canvas5Graph.cxx:112
@ RIGHT
Definition: MWAWParagraph.hxx:48
Class to store font.
Definition: MWAWFont.hxx:44
a simple path component
Definition: MWAWGraphicShape.hxx:53
friend std::ostream & operator<<(std::ostream &o, ShapeData const &s)
operator<<
Definition: Canvas5Graph.cxx:87
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
std::shared_ptr< Canvas5GraphInternal::State > m_state
the state
Definition: Canvas5Graph.hxx:172
unsigned m_ids[3]
the text link, matrix, name id
Definition: Canvas5Graph.cxx:114
bool hasSurface() const
returns true if the interior surface is defined
Definition: MWAWGraphicStyle.hxx:519
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:120
MWAWBox2f m_initialBox
the original box
Definition: Canvas5Graph.cxx:227
int m_values[4]
some unknown value
Definition: Canvas5Graph.cxx:233
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
Internal: the state of a Canvas5Graph.
Definition: Canvas5Graph.cxx:272
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
bool readBitmap(Canvas5Structure::Stream &stream, MWAWEmbeddedObject &object, MWAWColor *avgColor=nullptr)
try to read a bitmap
Definition: Canvas5Parser.cxx:1032
bool readDouble(Canvas5Structure::Stream &stream, double &val, bool &isNaN) const
try to read a double 8
Definition: Canvas5Parser.cxx:2039
std::vector< MWAWVec2f > m_vertices
the shape vertices: line, ...
Definition: Canvas5Graph.cxx:119
a structure used to define an arrow
Definition: MWAWGraphicStyle.hxx:56
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