Canvas5StyleManager Class Reference documentation

Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
Canvas5StyleManager Class Reference

the main class to read the style part of Canvas 5 file More...

`#include <Canvas5StyleManager.hxx>`

## Classes
struct | StyleList
| a structure use to store a list of styles More...

## Public Member Functions
| Canvas5StyleManager (Canvas5Parser &parser)
| constructor More...
virtual | ~Canvas5StyleManager ()
| destructor More...
int | version () const
| returns the file version More...

## Protected Member Functions
bool | updateLineStyle (int sId, MWAWGraphicStyle &style, int &numLines, int lineId=-1, float *offset=nullptr)
| try to update the line style given the stroke id and returns the number of lines(plin) More...
bool | updateLineColor (int cId, MWAWGraphicStyle &style)
| try to update the line color given the color id More...
bool | updateSurfaceColor (int cId, MWAWGraphicStyle &style)
| try to update the surface color given the color id More...
bool | readArrows (Canvas5Structure::Stream &stream)
| try to read the arrows zones More...
bool | readCharStyle (Canvas5Structure::Stream &stream, int id, std::pair< MWAWFont, int > &fontId)
| try to read a character style More...
bool | readCharStyles (Canvas5Structure::Stream &stream)
| try to read the character styles More...
bool | readColors (Canvas5Structure::Stream &stream)
| try to read the ink color zones More...
bool | readDashes (Canvas5Structure::Stream &stream)
| try to read the dashes More...
bool | readFonts (Canvas5Structure::Stream &stream, int numFonts)
| try to read the fonts names More...
bool | readFormats (Canvas5Structure::Stream &stream)
| read the list of formats, mainly an unit's conversion table More...
bool | readPenSize (Canvas5Structure::Stream &stream)
| read the pen size (header file) More...
bool | readPenStyles (Canvas5Structure::Stream &stream)
| read the pen styles More...
bool | readStrokes (Canvas5Structure::Stream &stream)
| try to read the stroke styles More...
bool | readStyle (Canvas5Structure::Stream &stream, int id, StyleList *styles=nullptr)
| try to read a style More...
bool | readStyles (Canvas5Structure::Stream &stream)
| try to read the styles More...
bool | readArrow (Canvas5Structure::Stream &stream, MWAWGraphicStyle::Arrow &arrow, long len)
| try to read an arrow More...
bool | readColor (Canvas5Structure::Stream &stream, MWAWColor &color, std::string &extra)
| try to read a color: 12 unknown 4 components followed by a name More...
bool | readColorStyle (Canvas5Structure::Stream &stream, Canvas5StyleManagerInternal::ColorStyle &color, long len)
| try to read a color style More...
bool | readSymbol (Canvas5Structure::Stream &stream, Canvas5StyleManagerInternal::ColorStyle &color, long len)
| try to read a symbol More...
bool | readTexture (Canvas5Structure::Stream &stream, Canvas5StyleManagerInternal::ColorStyle &color, long len)
| try to read a texture More...
bool | readVKFL (Canvas5Structure::Stream &stream, Canvas5StyleManagerInternal::ColorStyle &texture, long len, std::vector< int > *typeList=nullptr)
| try to read an unknown vectorized graphic format used to store symbol, texture and arrow More...

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

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

## Friends
class | Canvas5Graph
class | Canvas5Parser

## Detailed Description

the main class to read the style part of Canvas 5 file

## Constructor & Destructor Documentation

## ◆ Canvas5StyleManager() [1/2]

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

constructor

## ◆ ~Canvas5StyleManager()

Canvas5StyleManager::~Canvas5StyleManager | ( |  | ) |
| virtual

destructor

## ◆ Canvas5StyleManager() [2/2]

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

## Member Function Documentation

## ◆ operator=()

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

## ◆ readArrow()

bool Canvas5StyleManager::readArrow | ( | Canvas5Structure::Stream & | stream,
|  | MWAWGraphicStyle::Arrow & | arrow,
|  | long | len
| ) |  |
| protected

try to read an arrow

## ◆ readArrows()

bool Canvas5StyleManager::readArrows | ( | Canvas5Structure::Stream & | stream | ) |
| protected

try to read the arrows zones

## ◆ readCharStyle()

bool Canvas5StyleManager::readCharStyle | ( | Canvas5Structure::Stream & | stream,
|  | int | id,
|  | std::pair< MWAWFont, int > & | fontId
| ) |  |
| protected

try to read a character style

## ◆ readCharStyles()

bool Canvas5StyleManager::readCharStyles | ( | Canvas5Structure::Stream & | stream | ) |
| protected

try to read the character styles

## ◆ readColor()

bool Canvas5StyleManager::readColor | ( | Canvas5Structure::Stream & | stream,
|  | MWAWColor & | color,
|  | std::string & | extra
| ) |  |
| protected

try to read a color: 12 unknown 4 components followed by a name

Referenced by readColorStyle(), and readVKFL().

## ◆ readColors()

bool Canvas5StyleManager::readColors | ( | Canvas5Structure::Stream & | stream | ) |
| protected

try to read the ink color zones

## ◆ readColorStyle()

bool Canvas5StyleManager::readColorStyle | ( | Canvas5Structure::Stream & | stream,
|  | Canvas5StyleManagerInternal::ColorStyle & | color,
|  | long | len
| ) |  |
| protected

try to read a color style

Referenced by readSymbol().

## ◆ readDashes()

bool Canvas5StyleManager::readDashes | ( | Canvas5Structure::Stream & | stream | ) |
| protected

try to read the dashes

## ◆ readFonts()

bool Canvas5StyleManager::readFonts | ( | Canvas5Structure::Stream & | stream,
|  | int | numFonts
| ) |  |
| protected

try to read the fonts names

## ◆ readFormats()

bool Canvas5StyleManager::readFormats | ( | Canvas5Structure::Stream & | stream | ) |
| protected

read the list of formats, mainly an unit's conversion table

## ◆ readPenSize()

bool Canvas5StyleManager::readPenSize | ( | Canvas5Structure::Stream & | stream | ) |
| protected

read the pen size (header file)

## ◆ readPenStyles()

bool Canvas5StyleManager::readPenStyles | ( | Canvas5Structure::Stream & | stream | ) |
| protected

read the pen styles

## ◆ readStrokes()

bool Canvas5StyleManager::readStrokes | ( | Canvas5Structure::Stream & | stream | ) |
| protected

try to read the stroke styles

## ◆ readStyle()

bool Canvas5StyleManager::readStyle | ( | Canvas5Structure::Stream & | stream,
|  | int | id,
|  | Canvas5StyleManager::StyleList * | styles = `nullptr`
| ) |  |
| protected

try to read a style

## ◆ readStyles()

bool Canvas5StyleManager::readStyles | ( | Canvas5Structure::Stream & | stream | ) |
| protected

try to read the styles

## ◆ readSymbol()

bool Canvas5StyleManager::readSymbol | ( | Canvas5Structure::Stream & | stream,
|  | Canvas5StyleManagerInternal::ColorStyle & | color,
|  | long | len
| ) |  |
| protected

try to read a symbol

Referenced by readColorStyle().

## ◆ readTexture()

bool Canvas5StyleManager::readTexture | ( | Canvas5Structure::Stream & | stream,
|  | Canvas5StyleManagerInternal::ColorStyle & | color,
|  | long | len
| ) |  |
| protected

try to read a texture

Referenced by readColorStyle().

## ◆ readVKFL()

bool Canvas5StyleManager::readVKFL | ( | Canvas5Structure::Stream & | stream,
|  | Canvas5StyleManagerInternal::ColorStyle & | texture,
|  | long | len,
|  | std::vector< int > * | typeList = `nullptr`
| ) |  |
| protected

try to read an unknown vectorized graphic format used to store symbol, texture and arrow

Note
  because this format is unknown, we fill the texture.m_texture and texture.m_color when we find a texture and will fill the list of type (expected 11) is this vector is defined.

Referenced by readArrow(), readSymbol(), and readTexture().

## ◆ updateLineColor()

bool Canvas5StyleManager::updateLineColor | ( | int | cId,
|  | MWAWGraphicStyle & | style
| ) |  |
| protected

try to update the line color given the color id

## ◆ updateLineStyle()

bool Canvas5StyleManager::updateLineStyle | ( | int | sId,
|  | MWAWGraphicStyle & | style,
|  | int & | numLines,
|  | int | lineId = `-1`,
|  | float * | offset = `nullptr`
| ) |  |
| protected

try to update the line style given the stroke id and returns the number of lines(plin)

Note
  in case of plin, after retrieving the number of lines, use lineId to define the line's style to set and give a offset pointer to retrieve this line offset

## ◆ updateSurfaceColor()

bool Canvas5StyleManager::updateSurfaceColor | ( | int | cId,
|  | MWAWGraphicStyle & | style
| ) |  |
| protected

try to update the surface color given the color id

## ◆ version()

int Canvas5StyleManager::version | ( |  | ) | const

returns the file version

## Friends And Related Function Documentation

## ◆ Canvas5Graph

friend class Canvas5Graph
| friend

## ◆ Canvas5Parser

friend class Canvas5Parser
| friend

## Member Data Documentation

## ◆ m_mainParser

Canvas5Parser* Canvas5StyleManager::m_mainParser
| protected

the main parser;

Referenced by readArrows(), readCharStyles(), readColors(), readDashes(), readFonts(), readPenStyles(), readStrokes(), readStyles(), and readVKFL().

## ◆ m_parserState

MWAWParserStatePtr Canvas5StyleManager::m_parserState
| protected

the parser state

Referenced by readCharStyle(), readFonts(), and version().

## ◆ m_state

std::shared_ptr<Canvas5StyleManagerInternal::State> Canvas5StyleManager::m_state
| protected

the state

Referenced by readCharStyle(), readColors(), readDashes(), readPenStyles(), updateLineColor(), updateLineStyle(), and updateSurfaceColor().

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

- Canvas5StyleManager.hxx
- Canvas5StyleManager.cxx