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 More...
 
virtual ~CanvasGraph ()
 destructor More...
 
int version () const
 returns the file version More...
 

Protected Member Functions

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

Protected Attributes

MWAWParserStatePtr m_parserState
 the parser state More...
 
std::shared_ptr< CanvasGraphInternal::Statem_state
 the state More...
 
CanvasParserm_mainParser
 the main parser; More...
 
std::shared_ptr< CanvasStyleManagerm_styleManager
 the style manager More...
 

Private Member Functions

 CanvasGraph (CanvasGraph const &orig)=delete
 
CanvasGraphoperator= (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

◆ ~CanvasGraph()

CanvasGraph::~CanvasGraph ( )
virtual

destructor

◆ CanvasGraph() [2/2]

CanvasGraph::CanvasGraph ( CanvasGraph const &  orig)
privatedelete

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

◆ 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 send().

◆ operator=()

CanvasGraph& CanvasGraph::operator= ( CanvasGraph const &  orig)
privatedelete

◆ 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 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 CanvasGraphInternal::SubDocument::parse(), and 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 Function Documentation

◆ CanvasGraphInternal::SubDocument

friend class CanvasGraphInternal::SubDocument
friend

◆ CanvasParser

friend class CanvasParser
friend

Member Data Documentation

◆ m_mainParser

CanvasParser* CanvasGraph::m_mainParser
protected

◆ m_parserState

◆ m_state

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

◆ m_styleManager

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

the style manager

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


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

Generated on Fri Sep 18 2020 18:14:52 for libmwaw by doxygen 1.8.20