Canvas5StyleManager.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2 
3 /* libmwaw
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33 
34 /*
35  * Parser to Canvas5 text document ( style part )
36  *
37  */
38 #ifndef CANVAS5_STYLE_MANAGER
39 # define CANVAS5_STYLE_MANAGER
40 
41 #include <string>
42 #include <utility>
43 #include <vector>
44 
45 #include <librevenge/librevenge.h>
46 
47 #include "libmwaw_internal.hxx"
48 
49 #include "MWAWDebug.hxx"
50 #include "MWAWGraphicStyle.hxx"
51 #include "MWAWInputStream.hxx"
52 #include "MWAWPosition.hxx"
53 
54 class MWAWFont;
55 class MWAWParagraph;
56 
57 namespace Canvas5Structure
58 {
59 struct Stream;
60 }
61 
63 {
64 struct ColorStyle;
65 struct State;
66 }
67 
68 class Canvas5Graph;
69 class Canvas5Parser;
70 
77 {
78  friend class Canvas5Graph;
79  friend class Canvas5Parser;
80 
81 public:
83  struct StyleList {
86  : m_fonts()
87  , m_paragraphs()
88  {
89  }
91  std::vector<std::pair<MWAWFont, int> > m_fonts;
93  std::vector<std::pair<MWAWParagraph, int> > m_paragraphs;
94  };
95 
97  explicit Canvas5StyleManager(Canvas5Parser &parser);
99  virtual ~Canvas5StyleManager();
100 
102  int version() const;
103 
104 protected:
105  // interface
106 
112  bool updateLineStyle(int sId, MWAWGraphicStyle &style, int &numLines, int lineId=-1, float *offset=nullptr);
114  bool updateLineColor(int cId, MWAWGraphicStyle &style);
116  bool updateSurfaceColor(int cId, MWAWGraphicStyle &style);
117 
118  //
119  // Intermediate level
120  //
121 
123  bool readArrows(Canvas5Structure::Stream &stream);
125  bool readCharStyle(Canvas5Structure::Stream &stream, int id, std::pair<MWAWFont, int> &fontId);
129  bool readColors(Canvas5Structure::Stream &stream);
131  bool readDashes(Canvas5Structure::Stream &stream);
133  bool readFonts(Canvas5Structure::Stream &stream, int numFonts);
143  bool readStyle(Canvas5Structure::Stream &stream, int id, StyleList *styles=nullptr);
145  bool readStyles(Canvas5Structure::Stream &stream);
146 
147  //
148  // Windows RSRC
149  //
150 
151  //
152  // Low level
153  //
154 
156  bool readArrow(Canvas5Structure::Stream &stream, MWAWGraphicStyle::Arrow &arrow, long len);
158  bool readColor(Canvas5Structure::Stream &stream, MWAWColor &color, std::string &extra);
170  bool readVKFL(Canvas5Structure::Stream &stream, Canvas5StyleManagerInternal::ColorStyle &texture, long len, std::vector<int> *typeList=nullptr);
171 
172 private:
175 
176 protected:
177  //
178  // data
179  //
182 
184  std::shared_ptr<Canvas5StyleManagerInternal::State> m_state;
185 
188 };
189 #endif
190 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWParagraph::m_justify
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
Canvas5StyleManager::readPenSize
bool readPenSize(Canvas5Structure::Stream &stream)
read the pen size (header file)
Definition: Canvas5StyleManager.cxx:1334
Canvas5StyleManagerInternal::PenStyle::m_size
MWAWVec2f m_size
the pen size
Definition: Canvas5StyleManager.cxx:149
Canvas5StyleManagerInternal::ColorStyle::m_textureDim
MWAWVec2i m_textureDim
the texture dimension
Definition: Canvas5StyleManager.cxx:103
MWAWGraphicStyle::Gradient::Stop::m_offset
float m_offset
the offset
Definition: MWAWGraphicStyle.hxx:170
MWAWFont::smallCapsBit
@ smallCapsBit
Definition: MWAWFont.hxx:192
Canvas5StyleManager::readVKFL
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
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
Canvas5StyleManagerInternal::PenStyle::m_lines
std::vector< Line > m_lines
the plin lines
Definition: Canvas5StyleManager.cxx:155
MWAWParagraph::m_dropNumLines
MWAWVariable< int > m_dropNumLines
the drop number of lines
Definition: MWAWParagraph.hxx:190
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
Canvas5Parser::isWindowsFile
bool isWindowsFile() const
returns true if the file is a windows file
Definition: Canvas5Parser.cxx:185
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MWAWGraphicStyle::setSurfaceColor
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:487
MWAWGraphicStyle::Hatch::H_Triple
@ H_Triple
Definition: MWAWGraphicStyle.hxx:278
Canvas5StyleManager::StyleList::StyleList
StyleList()
constructor
Definition: Canvas5StyleManager.hxx:85
MWAWGraphicStyle::Gradient::m_type
Type m_type
the gradient type
Definition: MWAWGraphicStyle.hxx:262
Canvas5StyleManager::readFonts
bool readFonts(Canvas5Structure::Stream &stream, int numFonts)
try to read the fonts names
Definition: Canvas5StyleManager.cxx:1225
Canvas5Parser::readExtendedHeader
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
Canvas5StyleManagerInternal::ColorStyle::m_gradient
MWAWGraphicStyle::Gradient m_gradient
the gradient
Definition: Canvas5StyleManager.cxx:99
MWAWGraphicStyle::Arrow::plain
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
MWAWFont::boldBit
@ boldBit
Definition: MWAWFont.hxx:190
MWAWGraphicStyle::m_surfaceOpacity
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:597
MWAWParagraph::m_dropNumCharacters
MWAWVariable< int > m_dropNumCharacters
the drop number character
Definition: MWAWParagraph.hxx:188
Canvas5StyleManager::StyleList::m_paragraphs
std::vector< std::pair< MWAWParagraph, int > > m_paragraphs
the paragraph list and the tab id
Definition: Canvas5StyleManager.hxx:93
Canvas5StyleManagerInternal::Stroke::m_penId
int m_penId
the pen id
Definition: Canvas5StyleManager.cxx:186
MWAWParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
Canvas5StyleManagerInternal::State::m_idToPen
std::map< int, PenStyle > m_idToPen
the id to pen style map
Definition: Canvas5StyleManager.cxx:211
MWAWFontConverter.hxx
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MWAWParagraph::m_spacings
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
Canvas5StyleManagerInternal::State
Internal: the state of a Canvas5StyleManager.
Definition: Canvas5StyleManager.cxx:195
Canvas5StyleManagerInternal::PenStyle::PenStyle
PenStyle()
constructor
Definition: Canvas5StyleManager.cxx:130
MWAWGraphicStyle::Gradient::G_Linear
@ G_Linear
Definition: MWAWGraphicStyle.hxx:177
Canvas5Graph
the main class to read the graphic part of Canvas5 file
Definition: Canvas5Graph.hxx:83
Canvas5Parser.hxx
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
Canvas5Parser::readIndexMap
bool readIndexMap(Canvas5Structure::Stream &stream, std::string const &what, DataFunction const &func=&Canvas5Parser::defDataFunction)
try to read a index map
Definition: Canvas5Parser.cxx:2288
MWAWColor::str
std::string str() const
print the color in the form #rrggbb
Definition: libmwaw_internal.cxx:232
Canvas5StyleManagerInternal::ColorStyle::m_isBad
bool m_isBad
a flag to know if the color is read
Definition: Canvas5StyleManager.cxx:107
MWAWFont::Line::Simple
@ Simple
Definition: MWAWFont.hxx:49
Canvas5Structure::Stream::input
MWAWInputStreamPtr input()
returns the input file
Definition: Canvas5Structure.hxx:62
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
Canvas5StyleManager::readCharStyles
bool readCharStyles(Canvas5Structure::Stream &stream)
try to read the character styles
Definition: Canvas5StyleManager.cxx:1693
MWAWGraphicStyle
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
MWAWParagraph::m_margins
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
Canvas5StyleManagerInternal::ColorStyle::m_nameId
int m_nameId
the name id
Definition: Canvas5StyleManager.cxx:95
Canvas5StyleManager::readSymbol
bool readSymbol(Canvas5Structure::Stream &stream, Canvas5StyleManagerInternal::ColorStyle &color, long len)
try to read a symbol
Definition: Canvas5StyleManager.cxx:1046
Canvas5StyleManagerInternal::PenStyle::m_usePenColor
bool m_usePenColor
use pen ink
Definition: Canvas5StyleManager.cxx:153
MWAWFont::embossBit
@ embossBit
Definition: MWAWFont.hxx:190
MWAWGraphicStyle::m_lineOpacity
float m_lineOpacity
the line opacity: 0=transparent
Definition: MWAWGraphicStyle.hxx:591
Canvas5StyleManager::readColor
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
Canvas5StyleManager::StyleList::m_fonts
std::vector< std::pair< MWAWFont, int > > m_fonts
the fonts and the paragraph id
Definition: Canvas5StyleManager.hxx:91
Canvas5StyleManagerInternal::PenStyle::m_colors
MWAWColor m_colors[2]
the neo color
Definition: Canvas5StyleManager.cxx:151
MWAWFont::uppercaseBit
@ uppercaseBit
Definition: MWAWFont.hxx:192
Canvas5StyleManagerInternal::ColorStyle::m_type
unsigned m_type
the type
Definition: Canvas5StyleManager.cxx:93
Canvas5StyleManager.hxx
MWAWGraphicStyle::Gradient::G_Rectangular
@ G_Rectangular
Definition: MWAWGraphicStyle.hxx:177
Canvas5StyleManager::readCharStyle
bool readCharStyle(Canvas5Structure::Stream &stream, int id, std::pair< MWAWFont, int > &fontId)
try to read a character style
Definition: Canvas5StyleManager.cxx:1558
MWAWGraphicStyle::Pattern
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:348
Canvas5StyleManager::readArrow
bool readArrow(Canvas5Structure::Stream &stream, MWAWGraphicStyle::Arrow &arrow, long len)
try to read an arrow
Definition: Canvas5StyleManager.cxx:276
MWAWColor::barycenter
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:206
Canvas5StyleManagerInternal::ColorStyle::ColorStyle
ColorStyle()
constructor
Definition: Canvas5StyleManager.cxx:69
MWAWFont::initialcaseBit
@ initialcaseBit
Definition: MWAWFont.hxx:194
Canvas5StyleManagerInternal::PenStyle::Line::m_size
MWAWVec2f m_size
the line width
Definition: Canvas5StyleManager.cxx:123
Canvas5StyleManagerInternal::Stroke::Stroke
Stroke()
constructor
Definition: Canvas5StyleManager.cxx:162
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MWAWParagraph::m_breakStatus
MWAWVariable< int > m_breakStatus
a list of bits: 0x1 (unbreakable), 0x2 (do not break after)
Definition: MWAWParagraph.hxx:169
MWAWGraphicStyle::Gradient::Stop::m_color
MWAWColor m_color
the color
Definition: MWAWGraphicStyle.hxx:172
MWAWFont::shadowBit
@ shadowBit
Definition: MWAWFont.hxx:191
MWAWParagraph.hxx
Canvas5StyleManagerInternal::ColorStyle::m_hatch
MWAWGraphicStyle::Hatch m_hatch
the hatch
Definition: Canvas5StyleManager.cxx:101
Canvas5StyleManager::readStyle
bool readStyle(Canvas5Structure::Stream &stream, int id, StyleList *styles=nullptr)
try to read a style
Definition: Canvas5StyleManager.cxx:1745
Canvas5StyleManager::operator=
Canvas5StyleManager & operator=(Canvas5StyleManager const &orig)=delete
Canvas5StyleManager::m_mainParser
Canvas5Parser * m_mainParser
the main parser;
Definition: Canvas5StyleManager.hxx:187
Canvas5StyleManager::m_state
std::shared_ptr< Canvas5StyleManagerInternal::State > m_state
the state
Definition: Canvas5StyleManager.hxx:184
libmwaw_internal.hxx
MWAWGraphicStyle::m_lineWidth
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:585
MWAWPosition.hxx
Canvas5StyleManagerInternal::PenStyle::Line::Line
Line()
constructor
Definition: Canvas5StyleManager.cxx:116
Canvas5StyleManagerInternal::State::m_idToStroke
std::map< int, Stroke > m_idToStroke
the id to stroke style map
Definition: Canvas5StyleManager.cxx:215
MWAWGraphicStyle::Gradient::Stop
a structure used to define the gradient limit in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:141
Canvas5Parser::readSpecialData
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
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
Canvas5Structure::Stream::ascii
libmwaw::DebugFile & ascii()
return the ascii file
Definition: Canvas5Structure.hxx:67
Canvas5StyleManager::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition: Canvas5StyleManager.hxx:181
Canvas5Structure
a namespace used to define basic structure to read a Canvas 5 file
Definition: Canvas5Graph.hxx:60
M_PI
#define M_PI
Definition: libmwaw_internal.hxx:52
Canvas5StyleManager::readStrokes
bool readStrokes(Canvas5Structure::Stream &stream)
try to read the stroke styles
Definition: Canvas5StyleManager.cxx:1520
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
Canvas5Parser
the main class to read a Canvas 5 files
Definition: Canvas5Parser.hxx:71
Canvas5StyleManagerInternal
Internal: the structures of a Canvas5StyleManager.
Definition: Canvas5StyleManager.cxx:63
MWAWVec2< int >
Canvas5StyleManager::StyleList
a structure use to store a list of styles
Definition: Canvas5StyleManager.hxx:83
MWAWGraphicListener.hxx
MWAWDebug.hxx
MWAWGraphicStyle::Hatch::H_Double
@ H_Double
Definition: MWAWGraphicStyle.hxx:278
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
Canvas5Structure.hxx
MWAWGraphicStyle::Hatch::H_Single
@ H_Single
Definition: MWAWGraphicStyle.hxx:278
MWAWGraphicStyle::m_arrows
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:632
MWAWGraphicStyle::setPattern
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:498
MWAWColor::black
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
Canvas5StyleManagerInternal::Stroke
Internal: the stroke style of a Canvas5StyleManager.
Definition: Canvas5StyleManager.cxx:160
MWAWGraphicStyle::Hatch
a basic hatch used in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:276
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
Canvas5Parser::defDataFunction
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
Canvas5StyleManagerInternal::PenStyle::Line::m_offset
float m_offset
the offset
Definition: Canvas5StyleManager.cxx:125
Canvas5StyleManagerInternal::PenStyle::Line
a line of a Canvas5StyleManager pen style
Definition: Canvas5StyleManager.cxx:114
Canvas5StyleManagerInternal::Stroke::operator<<
friend std::ostream & operator<<(std::ostream &o, Stroke const &stroke)
Definition: Canvas5StyleManager.cxx:169
Canvas5StyleManager::Canvas5StyleManager
Canvas5StyleManager(Canvas5StyleManager const &orig)=delete
Canvas5Parser::getString
static std::string getString(unsigned val)
very low level: debug print some uint32_t either at char4 or sample int
Definition: Canvas5Parser.cxx:2570
Canvas5StyleManagerInternal::PenStyle::m_type
unsigned m_type
the type
Definition: Canvas5StyleManager.cxx:147
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWGraphicStyle::m_lineColor
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:593
Canvas5Parser::stringDataFunction
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
MWAWBox2i
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
Canvas5StyleManagerInternal::State::m_idToArrow
std::map< int, MWAWGraphicStyle::Arrow > m_idToArrow
the id to arrow map
Definition: Canvas5StyleManager.cxx:207
Canvas5StyleManagerInternal::State::m_idToDash
std::map< int, std::vector< float > > m_idToDash
the id to dash map
Definition: Canvas5StyleManager.cxx:213
Canvas5StyleManagerInternal::PenStyle
Internal: the pen style of a Canvas5StyleManager.
Definition: Canvas5StyleManager.cxx:112
MWAWBox2::center
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1072
MWAWGraphicStyle.hxx
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:190
MWAWParagraph::m_marginsUnit
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
Canvas5StyleManagerInternal::Stroke::m_dashId
int m_dashId
the dash id
Definition: Canvas5StyleManager.cxx:188
MWAWGraphicStyle::Gradient
a basic gradient used in a MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:139
Canvas5StyleManagerInternal::ColorStyle::m_texture
MWAWEmbeddedObject m_texture
the embedded objet (texture)
Definition: Canvas5StyleManager.cxx:105
MWAWParagraph::NoBreakWithNextBit
@ NoBreakWithNextBit
Definition: MWAWParagraph.hxx:88
MWAWGraphicStyle::Gradient::m_percentCenter
MWAWVec2f m_percentCenter
the gradient center
Definition: MWAWGraphicStyle.hxx:270
Canvas5StyleManager::Canvas5StyleManager
Canvas5StyleManager(Canvas5Parser &parser)
constructor
Definition: Canvas5StyleManager.cxx:223
MWAWGraphicStyle::m_gradient
Gradient m_gradient
the gradient
Definition: MWAWGraphicStyle.hxx:610
Canvas5StyleManager::readColorStyle
bool readColorStyle(Canvas5Structure::Stream &stream, Canvas5StyleManagerInternal::ColorStyle &color, long len)
try to read a color style
Definition: Canvas5StyleManager.cxx:485
Canvas5StyleManagerInternal::Stroke::m_arrowId
int m_arrowId[2]
the arrow id (beg/end)
Definition: Canvas5StyleManager.cxx:190
MWAWGraphicStyle::Gradient::G_Ellipsoid
@ G_Ellipsoid
Definition: MWAWGraphicStyle.hxx:177
Canvas5Parser::readUsed
bool readUsed(Canvas5Structure::Stream &stream, std::string const &what)
try to read the used list
Definition: Canvas5Parser.cxx:2445
Canvas5StyleManagerInternal::ColorStyle::operator<<
friend std::ostream & operator<<(std::ostream &o, ColorStyle const &color)
Definition: Canvas5StyleManager.cxx:80
Canvas5StyleManagerInternal::PenStyle::operator<<
friend std::ostream & operator<<(std::ostream &o, PenStyle const &pen)
Definition: Canvas5StyleManager.cxx:138
Canvas5Structure::Stream
a sub stream of Canvas5Structure
Definition: Canvas5Structure.hxx:46
MWAWParagraph::JustificationFull
@ JustificationFull
Definition: MWAWParagraph.hxx:90
Canvas5StyleManager::readArrows
bool readArrows(Canvas5Structure::Stream &stream)
try to read the arrows zones
Definition: Canvas5StyleManager.cxx:244
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:91
MWAWParserStatePtr
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
Canvas5StyleManager::version
int version() const
returns the file version
Definition: Canvas5StyleManager.cxx:233
Canvas5StyleManagerInternal::PenStyle::Line::m_color
MWAWColor m_color
the line color
Definition: Canvas5StyleManager.cxx:127
Canvas5StyleManagerInternal::State::m_idToColor
std::map< int, ColorStyle > m_idToColor
the id to color style map
Definition: Canvas5StyleManager.cxx:209
MWAWGraphicStyle::m_hatch
Hatch m_hatch
the hatch
Definition: MWAWGraphicStyle.hxx:612
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWGraphicStyle::m_lineDashWidth
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: MWAWGraphicStyle.hxx:583
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
Canvas5StyleManagerInternal::State::State
State()
constructor
Definition: Canvas5StyleManager.cxx:197
MWAWGraphicStyle::Hatch::m_type
Type m_type
the hatch type
Definition: MWAWGraphicStyle.hxx:336
Canvas5StyleManager::readPenStyles
bool readPenStyles(Canvas5Structure::Stream &stream)
read the pen styles
Definition: Canvas5StyleManager.cxx:1354
Canvas5Parser::readDataHeader
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
libmwaw::DebugFile
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
Canvas5StyleManager::readColors
bool readColors(Canvas5Structure::Stream &stream)
try to read the ink color zones
Definition: Canvas5StyleManager.cxx:382
MWAWFont::Script
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
Canvas5StyleManager::updateSurfaceColor
bool updateSurfaceColor(int cId, MWAWGraphicStyle &style)
try to update the surface color given the color id
Definition: Canvas5StyleManager.cxx:2037
Canvas5Parser::readUnknownHeader
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
MWAWInputStream.hxx
Canvas5StyleManagerInternal::ColorStyle
Internal: the color style of a Canvas5StyleManager.
Definition: Canvas5StyleManager.cxx:67
Canvas5StyleManager::readFormats
bool readFormats(Canvas5Structure::Stream &stream)
read the list of formats, mainly an unit's conversion table
Definition: Canvas5StyleManager.cxx:1271
MWAWFont.hxx
Canvas5StyleManager::updateLineStyle
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
MWAWGraphicStyle::Gradient::m_angle
float m_angle
the gradient angle
Definition: MWAWGraphicStyle.hxx:266
MWAWBox2< float >
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
Canvas5StyleManager::~Canvas5StyleManager
virtual ~Canvas5StyleManager()
destructor
Definition: Canvas5StyleManager.cxx:230
MWAWGraphicStyle::Gradient::G_Radial
@ G_Radial
Definition: MWAWGraphicStyle.hxx:177
Canvas5StyleManager::readStyles
bool readStyles(Canvas5Structure::Stream &stream)
try to read the styles
Definition: Canvas5StyleManager.cxx:1940
Canvas5StyleManager
the main class to read the style part of Canvas 5 file
Definition: Canvas5StyleManager.hxx:77
MWAWGraphicStyle::Gradient::Type
Type
an enum used to define the gradient type
Definition: MWAWGraphicStyle.hxx:177
Canvas5StyleManager::updateLineColor
bool updateLineColor(int cId, MWAWGraphicStyle &style)
try to update the line color given the color id
Definition: Canvas5StyleManager.cxx:2001
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWParser.hxx
MWAWGraphicStyle::Gradient::m_stopList
std::vector< Stop > m_stopList
the list of gradient limits
Definition: MWAWGraphicStyle.hxx:264
MWAWColor::colorFromCMYK
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
Canvas5Parser::readBitmap
bool readBitmap(Canvas5Structure::Stream &stream, MWAWEmbeddedObject &object, MWAWColor *avgColor=nullptr)
try to read a bitmap
Definition: Canvas5Parser.cxx:1032
MWAWParagraph::NoBreakBit
@ NoBreakBit
Definition: MWAWParagraph.hxx:88
Canvas5StyleManager::readTexture
bool readTexture(Canvas5Structure::Stream &stream, Canvas5StyleManagerInternal::ColorStyle &color, long len)
try to read a texture
Definition: Canvas5StyleManager.cxx:1119
MWAWFont::lowercaseBit
@ lowercaseBit
Definition: MWAWFont.hxx:193
MWAWGraphicStyle::Arrow
a structure used to define an arrow
Definition: MWAWGraphicStyle.hxx:56
Canvas5StyleManager::readDashes
bool readDashes(Canvas5Structure::Stream &stream)
try to read the dashes
Definition: Canvas5StyleManager.cxx:1177
Canvas5StyleManagerInternal::ColorStyle::m_color
MWAWColor m_color
the basic color
Definition: Canvas5StyleManager.cxx:97
Canvas5StyleManagerInternal::Stroke::m_type
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