Canvas5Image Class Reference documentation

Canvas5Image Class Reference

the main class to read/convert the image or movie inside of Canvas 5-11 files More...

`#include <Canvas5Image.hxx>`

## Public Member Functions
| Canvas5Image (Canvas5Parser &parser)
| constructor
virtual | ~Canvas5Image ()
| destructor
int | version () const
| returns the file version
bool | readAGIFRsrc (std::shared_ptr< Canvas5Structure::Stream > stream)
| try to read the AGIF rsrc block: a list of vectorised image v6
bool | readMACORsrc (std::shared_ptr< Canvas5Structure::Stream > stream)
| try to read the macros rsrc blocks: a list of vectorised image
bool | readQkTmRsrc (Canvas5Structure::Stream &stream)
| try to read the QkTm rsrc block: a list of media? v6
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
bool | readImages (std::shared_ptr< Canvas5Structure::Stream > stream)
| try to read the second big block: the list of bitmap
bool | readImages9 (std::shared_ptr< Canvas5Structure::Stream > stream)
| try to read the list of bitmap: v9
bool | getBitmap (int bitmapId, MWAWEmbeddedObject &object)
| try to retrieve a bitmap given a bitmapId
std::shared_ptr< Canvas5ImageInternal::VKFLImage > | getGIF (int gifId)
| try to retrieve a gif given a GIF id
bool | readMacroIndent (Canvas5Structure::Stream &stream, std::vector< unsigned > &id, std::string &extra)
| try to read a macro indent (low level)
std::shared_ptr< Canvas5ImageInternal::VKFLImage > | getMACO (std::vector< unsigned > const &id)
| try to retrieve a macros image given a MACO id
bool | getQuickTime (int quicktimeId, MWAWEmbeddedObject &object)
| try to retrieve a quicktime given a quicktimeId
bool | getArrow (std::shared_ptr< Canvas5ImageInternal::VKFLImage > image, MWAWGraphicStyle::Arrow &arrow) const
| try to retrieve an arrow from a VKFL image
bool | getTexture (std::shared_ptr< Canvas5ImageInternal::VKFLImage > image, MWAWEmbeddedObject &texture, MWAWVec2i &textureDim, MWAWColor &averageColor) const
| try to retrieve an texture from a VKFL image
bool | send (std::shared_ptr< Canvas5ImageInternal::VKFLImage > image, MWAWListenerPtr listener, MWAWBox2f const &box, MWAWTransformation const &transformation, int depth=0) const
| try to send a image where box is the image bdbox before applying transformation

## Protected Member Functions
std::shared_ptr< Canvas5StyleManager > | getStyleManager () const
| return the style manager
bool | readVKFLShape (std::shared_ptr< Canvas5Structure::Stream > stream, Canvas5ImageInternal::VKFLImage &image)
| try to read a shape in an image
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
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
bool | send (Canvas5ImageInternal::VKFLImage const &image, size_t &shapeId, MWAWListenerPtr listener, MWAWGraphicStyle const &style, MWAWTransformation const &transformation, int depth=0) const
| try to send a shape

## Protected Attributes
MWAWParserStatePtr | m_parserState
| the parser state
std::shared_ptr< Canvas5ImageInternal::State > | m_state
| the state
Canvas5Parser * | m_mainParser
| the main parser;

## Private Member Functions
| Canvas5Image (Canvas5Image const &orig)=delete
Canvas5Image & | operator= (Canvas5Image const &orig)=delete

## Friends
class | Canvas5Parser

## Detailed Description

the main class to read/convert the image or movie inside of Canvas 5-11 files

Note
  Canvas can define many vectorized images in a drawing document (to store arrow, symbol, bitmap, macros, ...). There are stored in a "compressed" form: a series of continuous structures which are often similar to the drawing document structures.

## Constructor & Destructor Documentation

## ◆ Canvas5Image() [1/2]

Canvas5Image::Canvas5Image | ( | Canvas5Parser & | parser | ) |
| explicit

constructor

Referenced by Canvas5Image(), and operator=().

## ◆ ~Canvas5Image()

Canvas5Image::~Canvas5Image | ( |  | ) |
| virtual

destructor

## ◆ Canvas5Image() [2/2]

Canvas5Image::Canvas5Image | ( | Canvas5Image const & | orig | ) |
| privatedelete

## Member Function Documentation

## ◆ getArrow()

bool Canvas5Image::getArrow | ( | std::shared_ptr< Canvas5ImageInternal::VKFLImage > | image,
|  | MWAWGraphicStyle::Arrow & | arrow ) const

try to retrieve an arrow from a VKFL image

## ◆ getBitmap()

bool Canvas5Image::getBitmap | ( | int | bitmapId,
|  | MWAWEmbeddedObject & | object )

try to retrieve a bitmap given a bitmapId

## ◆ getGIF()

std::shared_ptr< Canvas5ImageInternal::VKFLImage > Canvas5Image::getGIF | ( | int | gifId | ) |

try to retrieve a gif given a GIF id

## ◆ getMACO()

std::shared_ptr< Canvas5ImageInternal::VKFLImage > Canvas5Image::getMACO | ( | std::vector< unsigned > const & | id | ) |

try to retrieve a macros image given a MACO id

## ◆ getQuickTime()

bool Canvas5Image::getQuickTime | ( | int | quicktimeId,
|  | MWAWEmbeddedObject & | object )

try to retrieve a quicktime given a quicktimeId

## ◆ getStyleManager()

std::shared_ptr< Canvas5StyleManager > Canvas5Image::getStyleManager | ( |  | ) | const
| protected

return the style manager

Referenced by readVKFLShapeOtherData(), and send().

## ◆ getTexture()

bool Canvas5Image::getTexture | ( | std::shared_ptr< Canvas5ImageInternal::VKFLImage > | image,
|  | MWAWEmbeddedObject & | texture,
|  | MWAWVec2i & | textureDim,
|  | MWAWColor & | averageColor ) const

try to retrieve an texture from a VKFL image

## ◆ operator=()

Canvas5Image & Canvas5Image::operator= | ( | Canvas5Image const & | orig | ) |
| privatedelete

## ◆ readAGIFRsrc()

bool Canvas5Image::readAGIFRsrc | ( | std::shared_ptr< Canvas5Structure::Stream > | stream | ) |

try to read the AGIF rsrc block: a list of vectorised image v6

## ◆ readImages()

bool Canvas5Image::readImages | ( | std::shared_ptr< Canvas5Structure::Stream > | stream | ) |

try to read the second big block: the list of bitmap

## ◆ readImages9()

bool Canvas5Image::readImages9 | ( | std::shared_ptr< Canvas5Structure::Stream > | stream | ) |

try to read the list of bitmap: v9

## ◆ readMACORsrc()

bool Canvas5Image::readMACORsrc | ( | std::shared_ptr< Canvas5Structure::Stream > | stream | ) |

try to read the macros rsrc blocks: a list of vectorised image

## ◆ readMacroIndent()

bool Canvas5Image::readMacroIndent | ( | Canvas5Structure::Stream & | stream,
|  | std::vector< unsigned > & | id,
|  | std::string & | extra )

try to read a macro indent (low level)

Referenced by readMACORsrc(), and readVKFLShapeMainData().

## ◆ readQkTmRsrc()

bool Canvas5Image::readQkTmRsrc | ( | Canvas5Structure::Stream & | stream | ) |

try to read the QkTm rsrc block: a list of media? v6

## ◆ readVKFL()

bool Canvas5Image::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

Referenced by readAGIFRsrc(), and readVKFLShapeMainData().

## ◆ readVKFLShape()

bool Canvas5Image::readVKFLShape | ( | std::shared_ptr< Canvas5Structure::Stream > | stream,
|  | Canvas5ImageInternal::VKFLImage & | image )
| protected

try to read a shape in an image

Referenced by readVKFL().

## ◆ readVKFLShapeMainData()

bool Canvas5Image::readVKFLShapeMainData | ( | std::shared_ptr< Canvas5Structure::Stream > | stream,
|  | Canvas5ImageInternal::VKFLImage & | image,
|  | Canvas5ImageInternal::VKFLShape & | shape,
|  | MWAWEntry const & | data )
| protected

try to read a shape header in an image

Referenced by readVKFLShape().

## ◆ readVKFLShapeOtherData()

bool Canvas5Image::readVKFLShapeOtherData | ( | std::shared_ptr< Canvas5Structure::Stream > | stream,
|  | Canvas5ImageInternal::VKFLImage & | image,
|  | std::tuple< MWAWEntry, unsigned, long > const & | dataTypePos,
|  | std::vector< long > & | childFieldPos,
|  | int | subId )
| protected

try to read a external data corresponding to some shapes in an image

Referenced by readVKFL().

## ◆ send() [1/2]

bool Canvas5Image::send | ( | Canvas5ImageInternal::VKFLImage const & | image,
|  | size_t & | shapeId,
|  | MWAWListenerPtr | listener,
|  | MWAWGraphicStyle const & | style,
|  | MWAWTransformation const & | transformation,
|  | int | depth = 0 ) const
| protected

try to send a shape

## ◆ send() [2/2]

bool Canvas5Image::send | ( | std::shared_ptr< Canvas5ImageInternal::VKFLImage > | image,
|  | MWAWListenerPtr | listener,
|  | MWAWBox2f const & | box,
|  | MWAWTransformation const & | transformation,
|  | int | depth = 0 ) const

try to send a image where box is the image bdbox before applying transformation

Referenced by readVKFL(), send(), and send().

## ◆ version()

int Canvas5Image::version | ( |  | ) | const

returns the file version

Referenced by readImages(), readImages9(), readMACORsrc(), readVKFL(), readVKFLShape(), readVKFLShapeMainData(), and readVKFLShapeOtherData().

## Friends And Related Symbol Documentation

## ◆ Canvas5Parser

friend class Canvas5Parser
| friend

Referenced by Canvas5Image(), and Canvas5Parser.

## Member Data Documentation

## ◆ m_mainParser

Canvas5Parser* Canvas5Image::m_mainParser
| protected

the main parser;

Referenced by Canvas5Image(), getStyleManager(), readImages(), readImages9(), readMACORsrc(), readVKFL(), readVKFLShape(), readVKFLShapeMainData(), readVKFLShapeOtherData(), and send().

## ◆ m_parserState

MWAWParserStatePtr Canvas5Image::m_parserState
| protected

the parser state

Referenced by Canvas5Image(), readVKFL(), and version().

## ◆ m_state

std::shared_ptr<Canvas5ImageInternal::State> Canvas5Image::m_state
| protected

the state

Referenced by Canvas5Image(), getBitmap(), getGIF(), getMACO(), getQuickTime(), readAGIFRsrc(), readImages(), readImages9(), and readQkTmRsrc().

The documentation for this class was generated from the following files:

- Canvas5Image.hxx
- Canvas5Image.cxx