the main class to read the style part of Canvas 5 file More...
#include <Canvas5StyleManager.hxx>
Classes | |
struct | CharStyle |
a structure use to store a character style More... | |
struct | StyleList |
a structure use to store a list of styles More... | |
Public Member Functions | |
Canvas5StyleManager (Canvas5Parser &parser) | |
constructor | |
virtual | ~Canvas5StyleManager () |
destructor | |
int | version () const |
returns the file version | |
std::shared_ptr< Canvas5Image > | getImageParser () const |
returns the image parser | |
std::shared_ptr< Canvas5StyleManagerInternal::ColorStyle > | readColorStyle (std::shared_ptr< Canvas5Structure::Stream > stream, unsigned type, long len) |
try to read a color style | |
bool | updateLineColor (Canvas5StyleManagerInternal::ColorStyle const &color, MWAWGraphicStyle &style) |
try to update the line color given a color style | |
bool | updateSurfaceColor (Canvas5StyleManagerInternal::ColorStyle const &color, MWAWGraphicStyle &style) |
try to update the surface color given a color style | |
std::shared_ptr< Canvas5StyleManagerInternal::PenStyle > | readPenStyle (Canvas5Structure::Stream &stream, unsigned type, long len) |
try to read a pen style | |
bool | updateLine (Canvas5StyleManagerInternal::PenStyle const &pen, MWAWGraphicStyle &style, int &numLines, int lineId, float *offset) |
try to update the line color given a color style | |
bool | readArrow (std::shared_ptr< Canvas5Structure::Stream > stream, MWAWGraphicStyle::Arrow &arrow, unsigned type, long len) |
try to read an arrow | |
bool | readCharStyle (Canvas5Structure::Stream &stream, int id, CharStyle &fontIds, bool useFileColors=true) |
try to read a character style, returns a font, a paragraph id and it potential link id | |
bool | readDash (Canvas5Structure::Stream &stream, std::vector< float > &dashes, unsigned type, long len) |
try to read a dash's array | |
bool | readStyleEnd (std::shared_ptr< Canvas5Structure::Stream > stream, MWAWFont *font=nullptr, MWAWParagraph *para=nullptr) |
try to read the second part of a style which contains minor paragraph styles, hyphen, ... | |
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) | |
bool | updateLineColor (int cId, MWAWGraphicStyle &style) |
try to update the line color given the color id | |
bool | updateSurfaceColor (int cId, MWAWGraphicStyle &style) |
try to update the surface color given the color id | |
bool | readArrows (std::shared_ptr< Canvas5Structure::Stream > stream) |
try to read the arrows zones | |
bool | readCharStyles (std::shared_ptr< Canvas5Structure::Stream > stream) |
try to read the character styles | |
bool | readInks (std::shared_ptr< Canvas5Structure::Stream > stream) |
try to read the ink color zones | |
bool | readInks9 (std::shared_ptr< Canvas5Structure::Stream > stream) |
try to read the ink color zones: v9 | |
bool | readColor (Canvas5Structure::Stream &stream, MWAWVariable< MWAWColor > &color, std::string &extra) |
try to read a color: 12 unknown 4 components followed by a type | |
bool | readDashes (std::shared_ptr< Canvas5Structure::Stream > stream) |
try to read the dashes | |
bool | readFrameStyles9 (std::shared_ptr< Canvas5Structure::Stream > stream) |
try to read the frame zones: stroke, pen style, arrow, dashes: v9 | |
bool | readFonts (std::shared_ptr< Canvas5Structure::Stream > stream, int numFonts) |
try to read the fonts names | |
bool | readFormats (std::shared_ptr< Canvas5Structure::Stream > stream) |
read the list of formats, mainly an unit's conversion table | |
bool | readPenSize (std::shared_ptr< Canvas5Structure::Stream > stream) |
read the pen size (header file) | |
bool | readPenStyles (std::shared_ptr< Canvas5Structure::Stream > stream) |
read the pen styles | |
bool | readStrokes (std::shared_ptr< Canvas5Structure::Stream > stream) |
try to read the stroke styles | |
bool | readParaStyle (std::shared_ptr< Canvas5Structure::Stream > stream, int id, StyleList *styles=nullptr) |
try to read a paragraph style | |
bool | readParaStyles (std::shared_ptr< Canvas5Structure::Stream > stream) |
try to read the paragraph styles | |
bool | readGradient (std::shared_ptr< Canvas5Structure::Stream > stream, long len, MWAWGraphicStyle::Gradient &gradient) |
try to read a gradient zone: OBFL | |
bool | readHatch (std::shared_ptr< Canvas5Structure::Stream > stream, long len, MWAWGraphicStyle::Hatch &hatch, MWAWVariable< MWAWColor > &backColor) |
try to read a hatch zone: htch | |
std::shared_ptr< Canvas5ImageInternal::VKFLImage > | readSymbol (std::shared_ptr< Canvas5Structure::Stream > stream, long len, MWAWVariable< MWAWColor > &backColor) |
try to read a symbol zone: vkfl/TXUR | |
Protected Attributes | |
MWAWParserStatePtr | m_parserState |
the parser state | |
std::shared_ptr< Canvas5StyleManagerInternal::State > | m_state |
the state | |
Canvas5Parser * | m_mainParser |
the main parser; | |
Private Member Functions | |
Canvas5StyleManager (Canvas5StyleManager const &orig)=delete | |
Canvas5StyleManager & | operator= (Canvas5StyleManager const &orig)=delete |
Friends | |
class | Canvas5Graph |
class | Canvas5Parser |
the main class to read the style part of Canvas 5 file
|
explicit |
constructor
|
virtual |
destructor
|
privatedelete |
std::shared_ptr< Canvas5Image > Canvas5StyleManager::getImageParser | ( | ) | const |
returns the image parser
Referenced by readArrow(), readColorStyle(), and readSymbol().
|
privatedelete |
bool Canvas5StyleManager::readArrow | ( | std::shared_ptr< Canvas5Structure::Stream > | stream, |
MWAWGraphicStyle::Arrow & | arrow, | ||
unsigned | type, | ||
long | len | ||
) |
try to read an arrow
|
protected |
try to read the arrows zones
bool Canvas5StyleManager::readCharStyle | ( | Canvas5Structure::Stream & | stream, |
int | id, | ||
CharStyle & | fontIds, | ||
bool | useFileColors = true |
||
) |
try to read a character style, returns a font, a paragraph id and it potential link id
Referenced by readCharStyles().
|
protected |
try to read the character styles
|
protected |
try to read a color: 12 unknown 4 components followed by a type
Referenced by readColorStyle(), readGradient(), readHatch(), and readPenStyle().
std::shared_ptr< Canvas5StyleManagerInternal::ColorStyle > Canvas5StyleManager::readColorStyle | ( | std::shared_ptr< Canvas5Structure::Stream > | stream, |
unsigned | type, | ||
long | len | ||
) |
try to read a color style
Referenced by readHatch(), readInks9(), and readSymbol().
bool Canvas5StyleManager::readDash | ( | Canvas5Structure::Stream & | stream, |
std::vector< float > & | dashes, | ||
unsigned | type, | ||
long | len | ||
) |
try to read a dash's array
Referenced by readDashes().
|
protected |
try to read the dashes
|
protected |
try to read the fonts names
|
protected |
read the list of formats, mainly an unit's conversion table
|
protected |
try to read the frame zones: stroke, pen style, arrow, dashes: v9
|
protected |
try to read a gradient zone: OBFL
Referenced by readColorStyle().
|
protected |
try to read a hatch zone: htch
Referenced by readColorStyle().
|
protected |
try to read the ink color zones
|
protected |
try to read the ink color zones: v9
|
protected |
try to read a paragraph style
Referenced by readParaStyles().
|
protected |
try to read the paragraph styles
|
protected |
read the pen size (header file)
std::shared_ptr< Canvas5StyleManagerInternal::PenStyle > Canvas5StyleManager::readPenStyle | ( | Canvas5Structure::Stream & | stream, |
unsigned | type, | ||
long | len | ||
) |
try to read a pen style
|
protected |
read the pen styles
|
protected |
try to read the stroke styles
bool Canvas5StyleManager::readStyleEnd | ( | std::shared_ptr< Canvas5Structure::Stream > | stream, |
MWAWFont * | font = nullptr , |
||
MWAWParagraph * | para = nullptr |
||
) |
try to read the second part of a style which contains minor paragraph styles, hyphen, ...
Referenced by readParaStyle().
|
protected |
try to read a symbol zone: vkfl/TXUR
Referenced by readColorStyle().
bool Canvas5StyleManager::updateLine | ( | Canvas5StyleManagerInternal::PenStyle const & | pen, |
MWAWGraphicStyle & | style, | ||
int & | numLines, | ||
int | lineId, | ||
float * | offset | ||
) |
try to update the line color given a color style
Referenced by updateLineStyle().
bool Canvas5StyleManager::updateLineColor | ( | Canvas5StyleManagerInternal::ColorStyle const & | color, |
MWAWGraphicStyle & | style | ||
) |
try to update the line color given a color style
Referenced by updateLineColor().
|
protected |
try to update the line color given the color id
|
protected |
try to update the line style given the stroke id and returns the number of lines(plin)
bool Canvas5StyleManager::updateSurfaceColor | ( | Canvas5StyleManagerInternal::ColorStyle const & | color, |
MWAWGraphicStyle & | style | ||
) |
try to update the surface color given a color style
Referenced by updateSurfaceColor().
|
protected |
try to update the surface color given the color id
int Canvas5StyleManager::version | ( | ) | const |
returns the file version
Referenced by readArrow(), readCharStyle(), readCharStyles(), readColorStyle(), readDash(), readGradient(), readHatch(), readParaStyle(), readParaStyles(), readPenStyle(), readStyleEnd(), and readSymbol().
|
friend |
|
friend |
|
protected |
the main parser;
Referenced by getImageParser(), readArrows(), readCharStyle(), readCharStyles(), readDash(), readDashes(), readFonts(), readFrameStyles9(), readGradient(), readHatch(), readInks(), readInks9(), readParaStyle(), readParaStyles(), readPenStyle(), readPenStyles(), readStrokes(), readStyleEnd(), and readSymbol().
|
protected |
the parser state
Referenced by readCharStyle(), readFonts(), and version().
|
protected |
the state
Referenced by readCharStyle(), readDashes(), readFrameStyles9(), readInks9(), updateLineColor(), updateLineStyle(), and updateSurfaceColor().