CanvasGraph Class Reference

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

`#include <CanvasGraph.hxx>`

## Public Member Functions
| CanvasGraph (CanvasParser &parser)
| constructor
virtual | ~CanvasGraph ()
| destructor
int | version () const
| returns the file version

## Protected Member Functions
void | setInput (MWAWInputStreamPtr &input)
| store the actual input
MWAWInputStreamPtr & | getInput ()
| returns the current input
bool | sendShape (int id)
| tries to send a shape with id
bool | readShapes (int numShapes, unsigned long shapeLength, unsigned long dataLength)
| try to read the shapes: in fact, the compression header + the list of shapes
bool | readShape (int n, std::vector< MWAWEntry > const &dataZonesList)
| try to read a shape: to do
bool | readShapeData (CanvasGraphInternal::Shape &shape)
| try to read the shapes data
bool | getBitmapBW (CanvasGraphInternal::Shape const &shape, MWAWEmbeddedObject &obj)
| tries to read a bitmap stored in the rectangle's data
bool | getBitmap (CanvasGraphInternal::Shape const &shape, MWAWEmbeddedObject &obj)
| tries to read the color bitmap stored in 55's shape: v3.5
bool | readFileBitmap (long length)
| tries to read the file bitmap: windows v3.5
bool | getPicture (CanvasGraphInternal::Shape const &shape, MWAWEmbeddedObject &obj)
| tries to read a picture stored in the picture's data
void | update (CanvasGraphInternal::Shape const &shape, MWAWGraphicStyle &style) const
| updates the style corresponding to a shape
bool | send (CanvasGraphInternal::Shape const &shape, CanvasGraphInternal::LocalTransform const *local=nullptr)
| tries to send a shape
bool | sendDimension (CanvasGraphInternal::Shape const &shape, CanvasGraphInternal::LocalTransform const &local)
| tries the dimension line's special shape: DIMN
bool | sendMultiLines (CanvasGraphInternal::Shape const &shape, CanvasGraphInternal::LocalTransform const &local)
| tries the multiligne's special shape: Palm
bool | sendSpecial (CanvasGraphInternal::Shape const &shape, CanvasGraphInternal::LocalTransform const &local)
| tries to send the special content
bool | sendText (CanvasGraphInternal::Shape const &shape)
| tries to send the text of a text's shape
bool | sendText (int zId)
| tries to send the text of a text's shape given a zone id
void | markSent (int id)
| mark the id's shape as read in debug mode
void | checkUnsent () const
| look for unsent shapes in debug mode

## Protected Attributes
MWAWParserStatePtr | m_parserState
| the parser state
std::shared_ptr< CanvasGraphInternal::State > | m_state
| the state
CanvasParser * | m_mainParser
| the main parser;
std::shared_ptr< CanvasStyleManager > | m_styleManager
| the style manager

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

## Friends
class | CanvasGraphInternal::SubDocument
class | CanvasParser

## Detailed Description

the main class to read the graphic part of Canvas file

## Constructor & Destructor Documentation

## ◆ CanvasGraph() [1/2]

CanvasGraph::CanvasGraph | ( | CanvasParser & | parser | ) |
| explicit

constructor

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

## ◆ ~CanvasGraph()

CanvasGraph::~CanvasGraph | ( |  | ) |
| virtual

destructor

## ◆ CanvasGraph() [2/2]

CanvasGraph::CanvasGraph | ( | CanvasGraph const & | orig | ) |
| private delete

## Member Function Documentation

## ◆ checkUnsent()

void CanvasGraph::checkUnsent | ( |  | ) | const
| protected

look for unsent shapes in debug mode

## ◆ getBitmap()

bool CanvasGraph::getBitmap | ( | CanvasGraphInternal::Shape const & | shape,
|  | MWAWEmbeddedObject & | obj )
| protected

tries to read the color bitmap stored in 55's shape: v3.5

Referenced by send().

## ◆ getBitmapBW()

bool CanvasGraph::getBitmapBW | ( | CanvasGraphInternal::Shape const & | shape,
|  | MWAWEmbeddedObject & | obj )
| protected

tries to read a bitmap stored in the rectangle's data

Referenced by getBitmap(), and send().

## ◆ getInput()

MWAWInputStreamPtr & CanvasGraph::getInput | ( |  | ) |
| protected

returns the current input

Referenced by getBitmap(), getBitmapBW(), getPicture(), readFileBitmap(), readShape(), readShapeData(), readShapes(), send(), sendDimension(), sendMultiLines(), and sendText().

## ◆ getPicture()

bool CanvasGraph::getPicture | ( | CanvasGraphInternal::Shape const & | shape,
|  | MWAWEmbeddedObject & | obj )
| protected

tries to read a picture stored in the picture's data

Referenced by send().

## ◆ markSent()

void CanvasGraph::markSent | ( | int | id | ) |
| protected

mark the id's shape as read in debug mode

Referenced by markSent(), and send().

## ◆ operator=()

CanvasGraph & CanvasGraph::operator= | ( | CanvasGraph const & | orig | ) |
| private delete

## ◆ readFileBitmap()

bool CanvasGraph::readFileBitmap | ( | long | length | ) |
| protected

tries to read the file bitmap: windows v3.5

## ◆ readShape()

bool CanvasGraph::readShape | ( | int | n,
|  | std::vector< MWAWEntry > const & | dataZonesList )
| protected

try to read a shape: to do

Referenced by readShapes().

## ◆ readShapeData()

bool CanvasGraph::readShapeData | ( | CanvasGraphInternal::Shape & | shape | ) |
| protected

try to read the shapes data

Referenced by readShape().

## ◆ readShapes()

bool CanvasGraph::readShapes | ( | int | numShapes,
|  | unsigned long | shapeLength,
|  | unsigned long | dataLength )
| protected

try to read the shapes: in fact, the compression header + the list of shapes

## ◆ send()

bool CanvasGraph::send | ( | CanvasGraphInternal::Shape const & | shape,
|  | CanvasGraphInternal::LocalTransform const * | local = nullptr )
| protected

tries to send a shape

Referenced by send(), and sendShape().

## ◆ sendDimension()

bool CanvasGraph::sendDimension | ( | CanvasGraphInternal::Shape const & | shape,
|  | CanvasGraphInternal::LocalTransform const & | local )
| protected

tries the dimension line's special shape: DIMN

Referenced by sendSpecial().

## ◆ sendMultiLines()

bool CanvasGraph::sendMultiLines | ( | CanvasGraphInternal::Shape const & | shape,
|  | CanvasGraphInternal::LocalTransform const & | local )
| protected

tries the multiligne's special shape: Palm

Referenced by sendSpecial().

## ◆ sendShape()

bool CanvasGraph::sendShape | ( | int | id | ) |
| protected

tries to send a shape with id

## ◆ sendSpecial()

bool CanvasGraph::sendSpecial | ( | CanvasGraphInternal::Shape const & | shape,
|  | CanvasGraphInternal::LocalTransform const & | local )
| protected

tries to send the special content

Referenced by send().

## ◆ sendText() [1/2]

bool CanvasGraph::sendText | ( | CanvasGraphInternal::Shape const & | shape | ) |
| protected

tries to send the text of a text's shape

Referenced by sendText().

## ◆ sendText() [2/2]

bool CanvasGraph::sendText | ( | int | zId | ) |
| protected

tries to send the text of a text's shape given a zone id

## ◆ setInput()

void CanvasGraph::setInput | ( | MWAWInputStreamPtr & | input | ) |
| protected

store the actual input

## ◆ update()

void CanvasGraph::update | ( | CanvasGraphInternal::Shape const & | shape,
|  | MWAWGraphicStyle & | style ) const
| protected

updates the style corresponding to a shape

Referenced by send().

## ◆ version()

int CanvasGraph::version | ( |  | ) | const

returns the file version

Referenced by readShape(), send(), and sendText().

## Friends And Related Symbol Documentation

## ◆ CanvasGraphInternal::SubDocument

friend class CanvasGraphInternal::SubDocument
| friend

## ◆ CanvasParser

friend class CanvasParser
| friend

Referenced by CanvasGraph(), and CanvasParser.

## Member Data Documentation

## ◆ m_mainParser

CanvasParser* CanvasGraph::m_mainParser
| protected

the main parser;

Referenced by CanvasGraph(), getBitmap(), getBitmapBW(), readShape(), readShapeData(), readShapes(), sendDimension(), and sendMultiLines().

## ◆ m_parserState

MWAWParserStatePtr CanvasGraph::m_parserState
| protected

the parser state

Referenced by CanvasGraph(), getBitmap(), getBitmapBW(), getPicture(), readFileBitmap(), readShape(), readShapeData(), readShapes(), send(), sendDimension(), sendMultiLines(), sendSpecial(), sendText(), and version().

## ◆ m_state

std::shared_ptr<CanvasGraphInternal::State> CanvasGraph::m_state
| protected

the state

Referenced by CanvasGraph(), checkUnsent(), getInput(), markSent(), readShape(), readShapeData(), send(), sendShape(), sendText(), and setInput().

## ◆ m_styleManager

std::shared_ptr<CanvasStyleManager> CanvasGraph::m_styleManager
| protected

the style manager

Referenced by CanvasGraph(), getBitmap(), readShapeData(), sendMultiLines(), and update().

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

- CanvasGraph.hxx
- CanvasGraph.cxx