Go to the documentation of this file.
38 # define CANVAS5_IMAGE
44 #include <librevenge/librevenge.h>
93 bool readAGIFRsrc(std::shared_ptr<Canvas5Structure::Stream> stream);
95 bool readMACORsrc(std::shared_ptr<Canvas5Structure::Stream> stream);
100 bool readVKFL(std::shared_ptr<Canvas5Structure::Stream> stream,
long len, std::shared_ptr<Canvas5ImageInternal::VKFLImage> &image);
103 bool readImages(std::shared_ptr<Canvas5Structure::Stream> stream);
105 bool readImages9(std::shared_ptr<Canvas5Structure::Stream> stream);
109 std::shared_ptr<Canvas5ImageInternal::VKFLImage>
getGIF(
int gifId);
113 std::shared_ptr<Canvas5ImageInternal::VKFLImage>
getMACO(std::vector<unsigned>
const &
id);
121 bool send(std::shared_ptr<Canvas5ImageInternal::VKFLImage> image,
MWAWListenerPtr listener,
137 std::tuple<MWAWEntry, unsigned, long>
const &dataTypePos,
138 std::vector<long> &childFieldPos,
int subId);
155 std::shared_ptr<Canvas5ImageInternal::State>
m_state;
the main class to read/convert the image or movie inside of Canvas 5-11 files
Definition: Canvas5Image.hxx:78
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
std::shared_ptr< Canvas5ImageInternal::VKFLImage > getGIF(int gifId)
try to retrieve a gif given a GIF id
Definition: Canvas5Image.cxx:269
bool checkTAG9(Canvas5Structure::Stream &stream, std::string const &tag, int type)
try to check is the following is a tag: v9
Definition: Canvas5Parser.cxx:3509
bool readVKFLShape(std::shared_ptr< Canvas5Structure::Stream > stream, Canvas5ImageInternal::VKFLImage &image)
try to read a shape in an image
Definition: Canvas5Image.cxx:1118
bool readMacroIndent(Canvas5Structure::Stream &stream, std::vector< unsigned > &id, std::string &extra)
try to read a macro indent (low level)
Definition: Canvas5Image.cxx:423
MWAWGraphicShape transform(MWAWTransformation const &matrix) const
returns a new shape corresponding to a matrix transformation
Definition: MWAWGraphicShape.cxx:404
std::map< long, std::vector< float > > m_posToDashMap
the position to dash map
Definition: Canvas5Image.cxx:201
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
bool getBitmap(int bitmapId, MWAWEmbeddedObject &object)
try to retrieve a bitmap given a bitmapId
Definition: Canvas5Image.cxx:258
VKFLImage()
constructor
Definition: Canvas5Image.cxx:168
int m_id
the identifier
Definition: Canvas5Parser.hxx:195
std::map< long, MWAWGraphicStyle::Arrow > m_posToArrowMap
the position to arrow map
Definition: Canvas5Image.cxx:197
Canvas5Image(Canvas5Image const &orig)=delete
MWAWEmbeddedObject m_bitmap
the bitmap
Definition: Canvas5Image.cxx:156
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:147
std::map< long, std::shared_ptr< Canvas5StyleManagerInternal::ColorStyle > > m_posToColorMap
the position to color map
Definition: Canvas5Image.cxx:199
bool readVKFLShapeMainData(std::shared_ptr< Canvas5Structure::Stream > stream, Canvas5ImageInternal::VKFLImage &image, Canvas5ImageInternal::VKFLShape &shape, MWAWEntry const &data)
try to read a shape header in an image
Definition: Canvas5Image.cxx:1218
std::vector< PathData > m_path
the list of path component
Definition: MWAWGraphicShape.hxx:234
VKFLShape()
constructor
Definition: Canvas5Image.cxx:95
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition: libmwaw_internal.hxx:512
std::map< long, Stroke > m_posToStrokeMap
the position to stroke map
Definition: Canvas5Image.cxx:207
std::map< int, librevenge::RVNGBinaryData > m_idToQkTm
the map id to quicktime
Definition: Canvas5Image.cxx:229
std::map< long, std::pair< unsigned, unsigned > > m_posToTypesMap
the map pos to type and sub type
Definition: Canvas5Image.cxx:194
int id() const
returns the id
Definition: MWAWEntry.hxx:164
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
Canvas5Image & operator=(Canvas5Image const &orig)=delete
State()
constructor
Definition: Canvas5Image.cxx:214
bool getTexture(std::shared_ptr< Canvas5ImageInternal::VKFLImage > image, MWAWEmbeddedObject &texture, MWAWVec2i &textureDim, MWAWColor &averageColor) const
try to retrieve an texture from a VKFL image
Definition: Canvas5Image.cxx:862
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
MWAWInputStreamPtr input()
returns the input file
Definition: Canvas5Structure.hxx:65
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MWAWTransformation m_transform
the shape transformation
Definition: Canvas5Graph.hxx:115
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
std::shared_ptr< Canvas5GraphInternal::PseudoShape > m_special
a graph pseudo box: special
Definition: Canvas5Image.cxx:160
static std::string getTypeName(int type)
Definition: Canvas5Image.cxx:111
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
std::map< long, std::array< double, 9 > > m_posToMatrixMap
the position to matrix map
Definition: Canvas5Image.cxx:203
long m_pos
the data beginning position (may be before the current position: v9)
Definition: Canvas5Parser.hxx:201
bool readBitmap(Stream &stream, int version, MWAWEmbeddedObject &object, MWAWColor *avgColor)
try to read a bitmap(low level)
Definition: Canvas5Structure.cxx:60
static MWAWGraphicShape polygon(MWAWBox2f const &box)
static constructor to create a polygon
Definition: MWAWGraphicShape.hxx:165
bool getTAG9(Canvas5Structure::Stream &stream, std::string &tag, int &type)
try to return a tag, type:0 means begin, type:1 means end: v9
Definition: Canvas5Parser.cxx:3542
MWAWParserStatePtr m_parserState
the parser state
Definition: Canvas5Image.hxx:152
unsigned m_subType
the sub type
Definition: Canvas5Image.cxx:143
Internal: the internal shape of a Canvas5Image.
Definition: Canvas5Image.cxx:93
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:473
MWAWGraphicStyle m_style
the shape style
Definition: Canvas5Graph.hxx:113
long m_penPos
the pen id
Definition: Canvas5Image.cxx:84
std::shared_ptr< VKFLImage > m_macoImage
a macro image : special
Definition: Canvas5Image.cxx:162
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
bool readImages(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the second big block: the list of bitmap
Definition: Canvas5Image.cxx:311
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:585
std::vector< VKFLShape > m_shapes
the list of shape
Definition: Canvas5Image.cxx:187
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MWAWBox2f m_box
the dimension
Definition: Canvas5Image.cxx:145
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:70
bool readVKFL(std::shared_ptr< Canvas5Structure::Stream > stream, long len, std::shared_ptr< Canvas5ImageInternal::VKFLImage > &image)
try to read an unknown vectorized graphic format used to store symbol, texture and arrow
Definition: Canvas5Image.cxx:886
bool getQuickTime(int quicktimeId, MWAWEmbeddedObject &object)
try to retrieve a quicktime given a quicktimeId
Definition: Canvas5Image.cxx:289
a namespace used to define basic function or structure to read a Canvas v5-v11 file
Definition: Canvas5BMParser.hxx:64
#define M_PI
Definition: libmwaw_internal.hxx:52
bool getBinaryResult(MWAWEmbeddedObject &result)
return the final graphic
Definition: MWAWGraphicEncoder.cxx:77
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
the main class to read a Canvas 5-10 files (and probably some not password protected Windows 11 files...
Definition: Canvas5Parser.hxx:72
Internal: the structures of a Canvas5Image.
Definition: Canvas5Image.cxx:70
void setMax(MWAWVec2< T > const &y)
resets the maximum point
Definition: libmwaw_internal.hxx:1090
bool readBitmapDAD58Bim(Stream &stream, int version, MWAWEmbeddedObject &object)
try to read a bitmap followed by DAD5 and 8BIM zones
Definition: Canvas5Structure.cxx:286
MWAWBox2f m_boxes[2]
the dimensions
Definition: Canvas5Image.cxx:189
bool readDefined(Canvas5Structure::Stream &stream, std::vector< bool > &defined, std::string const &what)
try to read the defined list
Definition: Canvas5Parser.cxx:3246
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
std::shared_ptr< Canvas5ImageInternal::State > m_state
the state
Definition: Canvas5Image.hxx:155
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:632
std::array< double, 9 > m_matrices[2]
the transformations
Definition: Canvas5Image.cxx:191
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
bool readQkTmRsrc(Canvas5Structure::Stream &stream)
try to read the QkTm rsrc block: a list of media? v6
Definition: Canvas5Image.cxx:754
std::shared_ptr< Canvas5ImageInternal::VKFLImage > getMACO(std::vector< unsigned > const &id)
try to retrieve a macros image given a MACO id
Definition: Canvas5Image.cxx:279
std::vector< MWAWVec2f > m_vertices
the vertices: spline, poly, ...
Definition: Canvas5Image.cxx:152
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
Stroke()
constructor
Definition: Canvas5Image.cxx:74
bool readVKFLShapeOtherData(std::shared_ptr< Canvas5Structure::Stream > stream, Canvas5ImageInternal::VKFLImage &image, std::tuple< MWAWEntry, unsigned, long > const &dataTypePos, std::vector< long > &childFieldPos, int subId)
try to read a external data corresponding to some shapes in an image
Definition: Canvas5Image.cxx:1440
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
std::shared_ptr< Canvas5StyleManager > m_styleManager
the style manager
Definition: Canvas5Parser.hxx:256
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
Internal: the internal image of a Canvas5Image.
Definition: Canvas5Image.cxx:166
a structure used to store the item data of a Canvas5Parser
Definition: Canvas5Parser.hxx:183
bool readImages9(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the list of bitmap: v9
Definition: Canvas5Image.cxx:355
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
main class used to define store librevenge::RVNGDrawingInterface lists of command in a librevenge::RV...
Definition: MWAWGraphicEncoder.hxx:56
Canvas5Image(Canvas5Parser &parser)
constructor
Definition: Canvas5Image.cxx:237
Internal: the state of a Canvas5Image.
Definition: Canvas5Image.cxx:212
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
std::map< long, std::shared_ptr< Canvas5StyleManagerInternal::PenStyle > > m_posToPenMap
the position to pen map
Definition: Canvas5Image.cxx:205
int version() const
returns the file version
Definition: Canvas5Image.cxx:248
MWAWPosition m_position
the shape position position
Definition: Canvas5Graph.hxx:111
std::string getString(unsigned val)
very low level: debug print some uint32_t either at char4 or sample int
Definition: Canvas5Structure.cxx:47
static MWAWGraphicShape path(MWAWBox2f const &box)
static constructor to create a path
Definition: MWAWGraphicShape.hxx:173
bool readAGIFRsrc(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the AGIF rsrc block: a list of vectorised image v6
Definition: Canvas5Image.cxx:626
MWAWEntry m_data[2]
the data entry
Definition: Canvas5Image.cxx:185
long m_length
the data length (from current position)
Definition: Canvas5Parser.hxx:199
@ Page
Definition: MWAWPosition.hxx:51
a sub stream of Canvas5Structure
Definition: Canvas5Structure.hxx:49
virtual ~Canvas5Image()
destructor
Definition: Canvas5Image.cxx:244
std::map< std::vector< unsigned >, std::shared_ptr< VKFLImage > > m_idToMACO
the map id to maco
Definition: Canvas5Image.cxx:227
Internal: the stroke style of a Canvas5Image.
Definition: Canvas5Image.cxx:72
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
long m_dashPos
the dash id
Definition: Canvas5Image.cxx:86
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: MWAWGraphicStyle.hxx:583
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
MWAWVec3< float > MWAWVec3f
MWAWVec3 of float.
Definition: libmwaw_internal.hxx:1019
long m_arrowPos[2]
the arrow id (beg/end)
Definition: Canvas5Image.cxx:88
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
std::map< int, long > m_idToDataPos
the map id(type) to data pos in the main zone
Definition: Canvas5Image.cxx:147
std::map< int, std::shared_ptr< VKFLImage > > m_idToGIF
the map id to git
Definition: Canvas5Image.cxx:225
Canvas5Parser * m_mainParser
the main parser;
Definition: Canvas5Image.hxx:158
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
bool readMACORsrc(std::shared_ptr< Canvas5Structure::Stream > stream)
try to read the macros rsrc blocks: a list of vectorised image
Definition: Canvas5Image.cxx:456
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
std::map< int, MWAWEmbeddedObject > m_idToObject
the map id to bitmap
Definition: Canvas5Image.cxx:223
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:623
int m_type
the type
Definition: Canvas5Image.cxx:141
small class which defines a vector with 3 elements
Definition: libmwaw_internal.hxx:848
unsigned m_type
the type
Definition: Canvas5Image.cxx:82
a simple path component
Definition: MWAWGraphicShape.hxx:53
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
the main class to read the style part of Canvas 5 file
Definition: Canvas5StyleManager.hxx:86
std::shared_ptr< Canvas5Graph > m_graphParser
the graph parser
Definition: Canvas5Parser.hxx:252
MWAWGraphicStyle m_style
the graphic style
Definition: Canvas5Image.cxx:149
a structure use to store a character style
Definition: Canvas5StyleManager.hxx:92
float m_locals[2]
the local values : arc=>angles, rectOval=>oval size
Definition: Canvas5Image.cxx:154
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 local state of a Canvas5Graph.
Definition: Canvas5Graph.hxx:100
bool getArrow(std::shared_ptr< Canvas5ImageInternal::VKFLImage > image, MWAWGraphicStyle::Arrow &arrow) const
try to retrieve an arrow from a VKFL image
Definition: Canvas5Image.cxx:820
bool send(std::shared_ptr< Canvas5ImageInternal::VKFLImage > image, MWAWListenerPtr listener, MWAWBox2f const &box, MWAWTransformation const &transformation) const
try to send a image where box is the image bdbox before applying transformation
Definition: Canvas5Image.cxx:1685
std::shared_ptr< Canvas5StyleManager > getStyleManager() const
return the style manager
Definition: Canvas5Image.cxx:253
bool readDouble(Canvas5Structure::Stream &stream, double &val, bool &isNaN) const
try to read a double 8
Definition: Canvas5Parser.cxx:2959
a structure used to define an arrow
Definition: MWAWGraphicStyle.hxx:56
MWAWColor m_bitmapColor
the bitmap color
Definition: Canvas5Image.cxx:158
Generated on Mon Jul 26 2021 00:00:00 for libmwaw by
doxygen 1.8.20