Canvas5Graph Class Reference

the main class to read the graphic part of Canvas v5-v11 file More...

`#include <Canvas5Graph.hxx>`

## Classes

struct | LocalState
| Internal: the local state of a Canvas5Graph. More...

## Public Member Functions

| Canvas5Graph (Canvas5Parser &parser)
| constructor
virtual | ~Canvas5Graph ()
| destructor
int | version () const
| returns the file version

## Protected Member Functions

bool | sendShape (int sId)
| try to send a shape
bool | findShapeDataZones (std::shared_ptr< Canvas5Structure::Stream > stream)
| try to find the list of data's shape zones
bool | readShapeData (int id, Canvas5GraphInternal::Shape const &shape)
| try to read a shape data
bool | readSpecialData (std::shared_ptr< Canvas5Structure::Stream > stream, long len, Canvas5GraphInternal::ShapeData &data, std::string &extra)
| try to read a special shape data
std::shared_ptr< Canvas5GraphInternal::PseudoShape > | readSpecialData (std::shared_ptr< Canvas5Structure::Stream > stream, long len, unsigned type, MWAWBox2f const &box, std::string &extra)
| try to read a special shape data (internal helper to understand vkfl structure)
bool | readShapes (Canvas5Structure::Stream &stream, int numShapes)
| try to read the different shapes
bool | readMatrices (std::shared_ptr< Canvas5Structure::Stream > stream)
| try to read the different matrix
bool | readDeR3 (std::shared_ptr< Canvas5Structure::Stream > stream, Canvas5StyleManager::StyleList &styles)
| try to read a complementary styles zone: DeR3
bool | sendShape (int sId, LocalState const &local)
| try to send a shape with a transformation
bool | send (Canvas5GraphInternal::Shape const &shape, LocalState const &local)
| try to send a shape with a transformation
bool | sendSpecial (MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
| try to send a special shape
bool | sendSpecial (MWAWListenerPtr listener, Canvas5GraphInternal::PseudoShape const &pseudoShape, LocalState const &local)
| try to send a special shape
bool | sendText (MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data)
| try to send a text zone
bool | sendCurveText (MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
| try to send a curve's text zone: CvTe
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
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
bool | sendEffect (MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
| tries to send the effect's special shape: effe
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)
bool | sendTechnical (MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
| tries to send the technical shape: Tech (v7)
bool | sendGIF (MWAWListenerPtr listener, Canvas5GraphInternal::Shape const &shape, Canvas5GraphInternal::ShapeData const &data, LocalState const &local)
| tries to send the gif's shape: AnGf (v7)
void | send (MWAWListenerPtr listener, MWAWGraphicShape const &shape, MWAWTransformation const &transform, MWAWGraphicStyle const &style)
| tries to send a basic shape ( applying a transformation if need)
void | send (MWAWListenerPtr listener, librevenge::RVNGString const &text, MWAWVec2f const &center, MWAWTransformation const &transform, MWAWFont const &font, bool addFrame)
| tries to send a measure ( applying a transformation if need)

## Protected Attributes

MWAWParserStatePtr | m_parserState
| the parser state
std::shared_ptr< Canvas5GraphInternal::State > | m_state
| the state
Canvas5Parser * | m_mainParser
| the main parser;
std::shared_ptr< Canvas5Image > | m_imageParser
| the image parser
std::shared_ptr< Canvas5StyleManager > | m_styleManager
| the style manager

## Private Member Functions

| Canvas5Graph (Canvas5Graph const &orig)=delete
Canvas5Graph & | operator= (Canvas5Graph const &orig)=delete

## Friends

class | Canvas5GraphInternal::SubDocument
class | Canvas5Image
class | Canvas5Parser

## Detailed Description

the main class to read the graphic part of Canvas v5-v11 file

## Constructor & Destructor Documentation

## Canvas5Graph() [1/2]

Canvas5Graph::Canvas5Graph | ( | Canvas5Parser & | parser | ) |

explicit

constructor

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

## ~Canvas5Graph()

Canvas5Graph::~Canvas5Graph | ( |  | ) |

virtual

destructor

## Canvas5Graph() [2/2]

Canvas5Graph::Canvas5Graph | ( | Canvas5Graph const & | orig | ) |

private delete

## Member Function Documentation

## findShapeDataZones()

bool Canvas5Graph::findShapeDataZones | ( | std::shared_ptr< Canvas5Structure::Stream > | stream | ) |

protected

try to find the list of data's shape zones

## operator=()

Canvas5Graph & Canvas5Graph::operator= | ( | Canvas5Graph const & | orig | ) |

private delete

## readDeR3()

bool Canvas5Graph::readDeR3 | ( | std::shared_ptr< Canvas5Structure::Stream > | stream,
|  | Canvas5StyleManager::StyleList & | styles )

protected

try to read a complementary styles zone: DeR3

Referenced by sendText().

## readMatrices()

bool Canvas5Graph::readMatrices | ( | std::shared_ptr< Canvas5Structure::Stream > | stream | ) |

protected

try to read the different matrix

## readShapeData()

bool Canvas5Graph::readShapeData | ( | int | id,
|  | Canvas5GraphInternal::Shape const & | shape )

protected

try to read a shape data

Referenced by readShapes().

## readShapes()

bool Canvas5Graph::readShapes | ( | Canvas5Structure::Stream & | stream,
|  | int | numShapes )

protected

try to read the different shapes

## readSpecialData() [1/2]

bool Canvas5Graph::readSpecialData | ( | std::shared_ptr< Canvas5Structure::Stream > | stream,
|  | long | len,
|  | Canvas5GraphInternal::ShapeData & | data,
|  | std::string & | extra )

protected

try to read a special shape data

Referenced by readShapeData(), and readSpecialData().

## readSpecialData() [2/2]

std::shared_ptr< Canvas5GraphInternal::PseudoShape > Canvas5Graph::readSpecialData | ( | std::shared_ptr< Canvas5Structure::Stream > | stream,
|  | long | len,
|  | unsigned | type,
|  | MWAWBox2f const & | box,
|  | std::string & | extra )

protected

try to read a special shape data (internal helper to understand vkfl structure)

## send() [1/3]

bool Canvas5Graph::send | ( | Canvas5GraphInternal::Shape const & | shape,
|  | Canvas5Graph::LocalState const & | lTransform )

protected

try to send a shape with a transformation

Referenced by sendDimension(), sendDimension9(), sendExtrude(), sendShape(), sendSpecial(), and sendTechnical().

## send() [2/3]

void Canvas5Graph::send | ( | MWAWListenerPtr | listener,
|  | librevenge::RVNGString const & | text,
|  | MWAWVec2f const & | center,
|  | MWAWTransformation const & | transform,
|  | MWAWFont const & | font,
|  | bool | addFrame )

protected

tries to send a measure ( applying a transformation if need)

## send() [3/3]

void Canvas5Graph::send | ( | MWAWListenerPtr | listener,
|  | MWAWGraphicShape const & | shape,
|  | MWAWTransformation const & | transform,
|  | MWAWGraphicStyle const & | style )

protected

tries to send a basic shape ( applying a transformation if need)

## sendCurveText()

bool Canvas5Graph::sendCurveText | ( | MWAWListenerPtr | listener,
|  | Canvas5GraphInternal::Shape const & | shape,
|  | Canvas5GraphInternal::ShapeData const & | data,
|  | Canvas5Graph::LocalState const & | local )

protected

try to send a curve's text zone: CvTe

Referenced by sendSpecial().

## sendDimension()

bool Canvas5Graph::sendDimension | ( | MWAWListenerPtr | listener,
|  | Canvas5GraphInternal::Shape const & | shape,
|  | Canvas5GraphInternal::ShapeData const & | data,
|  | Canvas5Graph::LocalState const & | local )

protected

tries to send the dimension line's special shape: DIMN

Referenced by sendSpecial().

## sendDimension9()

bool Canvas5Graph::sendDimension9 | ( | MWAWListenerPtr | listener,
|  | Canvas5GraphInternal::Shape const & | shape,
|  | Canvas5GraphInternal::ShapeData const & | data,
|  | Canvas5Graph::LocalState const & | local )

protected

tries to send the dimension line's special shape: DIMN: v9

Referenced by sendSpecial().

## sendEffect()

bool Canvas5Graph::sendEffect | ( | MWAWListenerPtr | listener,
|  | Canvas5GraphInternal::Shape const & | shape,
|  | Canvas5GraphInternal::ShapeData const & | data,
|  | Canvas5Graph::LocalState const & | local )

protected

tries to send the effect's special shape: effe

Referenced by sendSpecial().

## sendExtrude()

bool Canvas5Graph::sendExtrude | ( | MWAWListenerPtr | listener,
|  | Canvas5GraphInternal::Shape const & | shape,
|  | Canvas5GraphInternal::ShapeData const & | data,
|  | Canvas5Graph::LocalState const & | local )

protected

tries to send the extrude's special shape: Extr (pretty basic)

Referenced by sendSpecial().

## sendGIF()

bool Canvas5Graph::sendGIF | ( | MWAWListenerPtr | listener,
|  | Canvas5GraphInternal::Shape const & | shape,
|  | Canvas5GraphInternal::ShapeData const & | data,
|  | Canvas5Graph::LocalState const & | local )

protected

tries to send the gif's shape: AnGf (v7)

Referenced by sendSpecial().

## sendShape() [1/2]

bool Canvas5Graph::sendShape | ( | int | sId | ) |

protected

try to send a shape

Referenced by send(), and sendShape().

## sendShape() [2/2]

bool Canvas5Graph::sendShape | ( | int | sId,
|  | Canvas5Graph::LocalState const & | local )

protected

try to send a shape with a transformation

## sendSpecial() [1/2]

bool Canvas5Graph::sendSpecial | ( | MWAWListenerPtr | listener,
|  | Canvas5GraphInternal::PseudoShape const & | pseudoShape,
|  | LocalState const & | local )

protected

try to send a special shape

## sendSpecial() [2/2]

bool Canvas5Graph::sendSpecial | ( | MWAWListenerPtr | listener,
|  | Canvas5GraphInternal::Shape const & | shape,
|  | Canvas5GraphInternal::ShapeData const & | data,
|  | Canvas5Graph::LocalState const & | local )

protected

try to send a special shape

Referenced by send(), and sendSpecial().

## sendTechnical()

bool Canvas5Graph::sendTechnical | ( | MWAWListenerPtr | listener,
|  | Canvas5GraphInternal::Shape const & | shape,
|  | Canvas5GraphInternal::ShapeData const & | data,
|  | Canvas5Graph::LocalState const & | local )

protected

tries to send the technical shape: Tech (v7)

Referenced by sendSpecial().

## sendText()

bool Canvas5Graph::sendText | ( | MWAWListenerPtr | listener,
|  | Canvas5GraphInternal::Shape const & | shape,
|  | Canvas5GraphInternal::ShapeData const & | data )

protected

try to send a text zone

## version()

int Canvas5Graph::version | ( |  | ) | const

returns the file version

Referenced by readDeR3(), readMatrices(), readShapeData(), readShapes(), readSpecialData(), send(), sendCurveText(), sendDimension(), sendDimension9(), sendSpecial(), and sendText().

## Friends And Related Symbol Documentation

## Canvas5GraphInternal::SubDocument

friend class Canvas5GraphInternal::SubDocument

friend

## Canvas5Image

friend class Canvas5Image

friend

Referenced by Canvas5Image.

## Canvas5Parser

friend class Canvas5Parser

friend

Referenced by Canvas5Graph(), and Canvas5Parser.

## Member Data Documentation

## m_imageParser

std::shared_ptr<Canvas5Image> Canvas5Graph::m_imageParser

protected

the image parser

Referenced by Canvas5Graph(), readSpecialData(), sendEffect(), and sendSpecial().

## m_mainParser

Canvas5Parser* Canvas5Graph::m_mainParser

protected

the main parser;

Referenced by Canvas5Graph(), readDeR3(), readMatrices(), readShapeData(), readShapes(), readSpecialData(), sendCurveText(), sendDimension(), sendDimension9(), sendExtrude(), sendTechnical(), and sendText().

## m_parserState

MWAWParserStatePtr Canvas5Graph::m_parserState

protected

the parser state

Referenced by Canvas5Graph(), send(), sendCurveText(), sendDimension9(), and version().

## m_state

std::shared_ptr<Canvas5GraphInternal::State> Canvas5Graph::m_state

protected

the state

Referenced by Canvas5Graph(), findShapeDataZones(), readMatrices(), readShapeData(), readShapes(), send(), sendShape(), and sendSpecial().

## m_styleManager

std::shared_ptr<Canvas5StyleManager> Canvas5Graph::m_styleManager

protected

the style manager

Referenced by Canvas5Graph(), readDeR3(), send(), sendCurveText(), and sendText().

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

- Canvas5Graph.hxx
- Canvas5Graph.cxx