Go to the documentation of this file.
38 #ifndef CANVAS5_STYLE_MANAGER
39 # define CANVAS5_STYLE_MANAGER
45 #include <librevenge/librevenge.h>
91 std::vector<std::pair<MWAWFont, int> >
m_fonts;
184 std::shared_ptr<Canvas5StyleManagerInternal::State>
m_state;
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
bool readPenSize(Canvas5Structure::Stream &stream)
read the pen size (header file)
Definition: Canvas5StyleManager.cxx:1334
MWAWVec2f m_size
the pen size
Definition: Canvas5StyleManager.cxx:149
MWAWVec2i m_textureDim
the texture dimension
Definition: Canvas5StyleManager.cxx:103
float m_offset
the offset
Definition: MWAWGraphicStyle.hxx:170
@ smallCapsBit
Definition: MWAWFont.hxx:192
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
Definition: Canvas5StyleManager.cxx:734
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
std::vector< Line > m_lines
the plin lines
Definition: Canvas5StyleManager.cxx:155
MWAWVariable< int > m_dropNumLines
the drop number of lines
Definition: MWAWParagraph.hxx:190
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
bool isWindowsFile() const
returns true if the file is a windows file
Definition: Canvas5Parser.cxx:185
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:487
@ H_Triple
Definition: MWAWGraphicStyle.hxx:278
StyleList()
constructor
Definition: Canvas5StyleManager.hxx:85
Type m_type
the gradient type
Definition: MWAWGraphicStyle.hxx:262
bool readFonts(Canvas5Structure::Stream &stream, int numFonts)
try to read the fonts names
Definition: Canvas5StyleManager.cxx:1225
bool readExtendedHeader(Canvas5Structure::Stream &stream, int expectedValue, std::string const &what, DataFunction const &func)
try to read an extended data header, ie.
Definition: Canvas5Parser.cxx:2119
MWAWGraphicStyle::Gradient m_gradient
the gradient
Definition: Canvas5StyleManager.cxx:99
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
@ boldBit
Definition: MWAWFont.hxx:190
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:597
MWAWVariable< int > m_dropNumCharacters
the drop number character
Definition: MWAWParagraph.hxx:188
std::vector< std::pair< MWAWParagraph, int > > m_paragraphs
the paragraph list and the tab id
Definition: Canvas5StyleManager.hxx:93
int m_penId
the pen id
Definition: Canvas5StyleManager.cxx:186
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
std::map< int, PenStyle > m_idToPen
the id to pen style map
Definition: Canvas5StyleManager.cxx:211
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
Internal: the state of a Canvas5StyleManager.
Definition: Canvas5StyleManager.cxx:195
PenStyle()
constructor
Definition: Canvas5StyleManager.cxx:130
@ G_Linear
Definition: MWAWGraphicStyle.hxx:177
the main class to read the graphic part of Canvas5 file
Definition: Canvas5Graph.hxx:83
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
bool readIndexMap(Canvas5Structure::Stream &stream, std::string const &what, DataFunction const &func=&Canvas5Parser::defDataFunction)
try to read a index map
Definition: Canvas5Parser.cxx:2288
std::string str() const
print the color in the form #rrggbb
Definition: libmwaw_internal.cxx:232
bool m_isBad
a flag to know if the color is read
Definition: Canvas5StyleManager.cxx:107
@ Simple
Definition: MWAWFont.hxx:49
MWAWInputStreamPtr input()
returns the input file
Definition: Canvas5Structure.hxx:62
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
bool readCharStyles(Canvas5Structure::Stream &stream)
try to read the character styles
Definition: Canvas5StyleManager.cxx:1693
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
int m_nameId
the name id
Definition: Canvas5StyleManager.cxx:95
bool readSymbol(Canvas5Structure::Stream &stream, Canvas5StyleManagerInternal::ColorStyle &color, long len)
try to read a symbol
Definition: Canvas5StyleManager.cxx:1046
bool m_usePenColor
use pen ink
Definition: Canvas5StyleManager.cxx:153
@ embossBit
Definition: MWAWFont.hxx:190
float m_lineOpacity
the line opacity: 0=transparent
Definition: MWAWGraphicStyle.hxx:591
bool readColor(Canvas5Structure::Stream &stream, MWAWColor &color, std::string &extra)
try to read a color: 12 unknown 4 components followed by a name
Definition: Canvas5StyleManager.cxx:341
std::vector< std::pair< MWAWFont, int > > m_fonts
the fonts and the paragraph id
Definition: Canvas5StyleManager.hxx:91
MWAWColor m_colors[2]
the neo color
Definition: Canvas5StyleManager.cxx:151
@ uppercaseBit
Definition: MWAWFont.hxx:192
unsigned m_type
the type
Definition: Canvas5StyleManager.cxx:93
@ G_Rectangular
Definition: MWAWGraphicStyle.hxx:177
bool readCharStyle(Canvas5Structure::Stream &stream, int id, std::pair< MWAWFont, int > &fontId)
try to read a character style
Definition: Canvas5StyleManager.cxx:1558
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:348
bool readArrow(Canvas5Structure::Stream &stream, MWAWGraphicStyle::Arrow &arrow, long len)
try to read an arrow
Definition: Canvas5StyleManager.cxx:276
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:206
ColorStyle()
constructor
Definition: Canvas5StyleManager.cxx:69
@ initialcaseBit
Definition: MWAWFont.hxx:194
MWAWVec2f m_size
the line width
Definition: Canvas5StyleManager.cxx:123
Stroke()
constructor
Definition: Canvas5StyleManager.cxx:162
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MWAWVariable< int > m_breakStatus
a list of bits: 0x1 (unbreakable), 0x2 (do not break after)
Definition: MWAWParagraph.hxx:169
MWAWColor m_color
the color
Definition: MWAWGraphicStyle.hxx:172
@ shadowBit
Definition: MWAWFont.hxx:191
MWAWGraphicStyle::Hatch m_hatch
the hatch
Definition: Canvas5StyleManager.cxx:101
bool readStyle(Canvas5Structure::Stream &stream, int id, StyleList *styles=nullptr)
try to read a style
Definition: Canvas5StyleManager.cxx:1745
Canvas5StyleManager & operator=(Canvas5StyleManager const &orig)=delete
Canvas5Parser * m_mainParser
the main parser;
Definition: Canvas5StyleManager.hxx:187
std::shared_ptr< Canvas5StyleManagerInternal::State > m_state
the state
Definition: Canvas5StyleManager.hxx:184
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:585
Line()
constructor
Definition: Canvas5StyleManager.cxx:116
std::map< int, Stroke > m_idToStroke
the id to stroke style map
Definition: Canvas5StyleManager.cxx:215
a structure used to define the gradient limit in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:141
bool readSpecialData(long len, unsigned type, std::string &extra)
try to read a special shape data (internal helper to understand vkfl structure)
Definition: Canvas5Parser.cxx:190
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
libmwaw::DebugFile & ascii()
return the ascii file
Definition: Canvas5Structure.hxx:67
MWAWParserStatePtr m_parserState
the parser state
Definition: Canvas5StyleManager.hxx:181
a namespace used to define basic structure to read a Canvas 5 file
Definition: Canvas5Graph.hxx:60
#define M_PI
Definition: libmwaw_internal.hxx:52
bool readStrokes(Canvas5Structure::Stream &stream)
try to read the stroke styles
Definition: Canvas5StyleManager.cxx:1520
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
the main class to read a Canvas 5 files
Definition: Canvas5Parser.hxx:71
Internal: the structures of a Canvas5StyleManager.
Definition: Canvas5StyleManager.cxx:63
a structure use to store a list of styles
Definition: Canvas5StyleManager.hxx:83
@ H_Double
Definition: MWAWGraphicStyle.hxx:278
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
@ H_Single
Definition: MWAWGraphicStyle.hxx:278
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:632
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:498
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
Internal: the stroke style of a Canvas5StyleManager.
Definition: Canvas5StyleManager.cxx:160
a basic hatch used in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:276
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
static void defDataFunction(Canvas5Structure::Stream &, int, std::string const &, long)
the default function to parse the data of a index map/a extended header
Definition: Canvas5Parser.hxx:176
float m_offset
the offset
Definition: Canvas5StyleManager.cxx:125
a line of a Canvas5StyleManager pen style
Definition: Canvas5StyleManager.cxx:114
friend std::ostream & operator<<(std::ostream &o, Stroke const &stroke)
Definition: Canvas5StyleManager.cxx:169
Canvas5StyleManager(Canvas5StyleManager const &orig)=delete
static std::string getString(unsigned val)
very low level: debug print some uint32_t either at char4 or sample int
Definition: Canvas5Parser.cxx:2570
unsigned m_type
the type
Definition: Canvas5StyleManager.cxx:147
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:593
static void stringDataFunction(Canvas5Structure::Stream &stream, int id, std::string const &what, long len)
the default function to parse the data of a index map/a extended header
Definition: Canvas5Parser.cxx:2272
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
std::map< int, MWAWGraphicStyle::Arrow > m_idToArrow
the id to arrow map
Definition: Canvas5StyleManager.cxx:207
std::map< int, std::vector< float > > m_idToDash
the id to dash map
Definition: Canvas5StyleManager.cxx:213
Internal: the pen style of a Canvas5StyleManager.
Definition: Canvas5StyleManager.cxx:112
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1072
@ italicBit
Definition: MWAWFont.hxx:190
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
int m_dashId
the dash id
Definition: Canvas5StyleManager.cxx:188
a basic gradient used in a MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:139
MWAWEmbeddedObject m_texture
the embedded objet (texture)
Definition: Canvas5StyleManager.cxx:105
@ NoBreakWithNextBit
Definition: MWAWParagraph.hxx:88
MWAWVec2f m_percentCenter
the gradient center
Definition: MWAWGraphicStyle.hxx:270
Canvas5StyleManager(Canvas5Parser &parser)
constructor
Definition: Canvas5StyleManager.cxx:223
Gradient m_gradient
the gradient
Definition: MWAWGraphicStyle.hxx:610
bool readColorStyle(Canvas5Structure::Stream &stream, Canvas5StyleManagerInternal::ColorStyle &color, long len)
try to read a color style
Definition: Canvas5StyleManager.cxx:485
int m_arrowId[2]
the arrow id (beg/end)
Definition: Canvas5StyleManager.cxx:190
@ G_Ellipsoid
Definition: MWAWGraphicStyle.hxx:177
bool readUsed(Canvas5Structure::Stream &stream, std::string const &what)
try to read the used list
Definition: Canvas5Parser.cxx:2445
friend std::ostream & operator<<(std::ostream &o, ColorStyle const &color)
Definition: Canvas5StyleManager.cxx:80
friend std::ostream & operator<<(std::ostream &o, PenStyle const &pen)
Definition: Canvas5StyleManager.cxx:138
a sub stream of Canvas5Structure
Definition: Canvas5Structure.hxx:46
@ JustificationFull
Definition: MWAWParagraph.hxx:90
bool readArrows(Canvas5Structure::Stream &stream)
try to read the arrows zones
Definition: Canvas5StyleManager.cxx:244
@ JustificationRight
Definition: MWAWParagraph.hxx:91
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
int version() const
returns the file version
Definition: Canvas5StyleManager.cxx:233
MWAWColor m_color
the line color
Definition: Canvas5StyleManager.cxx:127
std::map< int, ColorStyle > m_idToColor
the id to color style map
Definition: Canvas5StyleManager.cxx:209
Hatch m_hatch
the hatch
Definition: MWAWGraphicStyle.hxx:612
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: MWAWGraphicStyle.hxx:583
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
State()
constructor
Definition: Canvas5StyleManager.cxx:197
Type m_type
the hatch type
Definition: MWAWGraphicStyle.hxx:336
bool readPenStyles(Canvas5Structure::Stream &stream)
read the pen styles
Definition: Canvas5StyleManager.cxx:1354
bool readDataHeader(Canvas5Structure::Stream &stream, int expectedSize, int &N)
try to read a data header, ie. N fields with a given size
Definition: Canvas5Parser.cxx:2098
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
bool readColors(Canvas5Structure::Stream &stream)
try to read the ink color zones
Definition: Canvas5StyleManager.cxx:382
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
bool updateSurfaceColor(int cId, MWAWGraphicStyle &style)
try to update the surface color given the color id
Definition: Canvas5StyleManager.cxx:2037
bool readUnknownHeader(Canvas5Structure::Stream &stream, MWAWEntry(&entries)[2], long len, std::string const &what)
try to read an unknown structure which defined some position and two entries
Definition: Canvas5Parser.cxx:2187
Internal: the color style of a Canvas5StyleManager.
Definition: Canvas5StyleManager.cxx:67
bool readFormats(Canvas5Structure::Stream &stream)
read the list of formats, mainly an unit's conversion table
Definition: Canvas5StyleManager.cxx:1271
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)
Definition: Canvas5StyleManager.cxx:2095
float m_angle
the gradient angle
Definition: MWAWGraphicStyle.hxx:266
Class to store font.
Definition: MWAWFont.hxx:44
virtual ~Canvas5StyleManager()
destructor
Definition: Canvas5StyleManager.cxx:230
@ G_Radial
Definition: MWAWGraphicStyle.hxx:177
bool readStyles(Canvas5Structure::Stream &stream)
try to read the styles
Definition: Canvas5StyleManager.cxx:1940
the main class to read the style part of Canvas 5 file
Definition: Canvas5StyleManager.hxx:77
Type
an enum used to define the gradient type
Definition: MWAWGraphicStyle.hxx:177
bool updateLineColor(int cId, MWAWGraphicStyle &style)
try to update the line color given the color id
Definition: Canvas5StyleManager.cxx:2001
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
std::vector< Stop > m_stopList
the list of gradient limits
Definition: MWAWGraphicStyle.hxx:264
static MWAWColor colorFromCMYK(unsigned char c, unsigned char m, unsigned char y, unsigned char k)
return a color from a cmyk color ( basic)
Definition: libmwaw_internal.hxx:218
bool readBitmap(Canvas5Structure::Stream &stream, MWAWEmbeddedObject &object, MWAWColor *avgColor=nullptr)
try to read a bitmap
Definition: Canvas5Parser.cxx:1032
@ NoBreakBit
Definition: MWAWParagraph.hxx:88
bool readTexture(Canvas5Structure::Stream &stream, Canvas5StyleManagerInternal::ColorStyle &color, long len)
try to read a texture
Definition: Canvas5StyleManager.cxx:1119
@ lowercaseBit
Definition: MWAWFont.hxx:193
a structure used to define an arrow
Definition: MWAWGraphicStyle.hxx:56
bool readDashes(Canvas5Structure::Stream &stream)
try to read the dashes
Definition: Canvas5StyleManager.cxx:1177
MWAWColor m_color
the basic color
Definition: Canvas5StyleManager.cxx:97
unsigned m_type
the type
Definition: Canvas5StyleManager.cxx:184
Generated on Wed Apr 7 2021 00:00:00 for libmwaw by
doxygen 1.8.20