Go to the documentation of this file.
44 #include <librevenge/librevenge.h>
55 struct LocalTransform;
100 bool readShapes(
int numShapes,
unsigned long shapeLength,
unsigned long dataLength);
102 bool readShape(
int n, std::vector<MWAWEntry>
const &dataZonesList);
155 std::shared_ptr<CanvasGraphInternal::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 decode(long length)
try to decode some data: length==-1 means decode end of input
Definition: CanvasParser.cxx:565
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
SubDocument(SubDocument const &orig)=delete
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
int getSpecialId() const
try to return the special type
Definition: CanvasGraph.cxx:129
@ smallCapsBit
Definition: MWAWFont.hxx:192
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: CanvasGraph.cxx:396
bool readFileBitmap(long length)
tries to read the file bitmap: windows v3.5
Definition: CanvasGraph.cxx:1338
MWAWBox2f getBdBox() const
returns the basic bdbox
Definition: MWAWGraphicShape.hxx:197
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
std::string m_specialType
the special type
Definition: CanvasGraph.cxx:277
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
bool readShapeData(CanvasGraphInternal::Shape &shape)
try to read the shapes data
Definition: CanvasGraph.cxx:731
void setColors(std::vector< MWAWColor > const &cols)
sets the array of indexed colors
Definition: MWAWPictBitmap.hxx:446
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:415
std::vector< MWAWVec2f > smoothPoints(std::vector< MWAWVec2f > const &vertices)
Internal: try to smooth a list of points.
Definition: CanvasGraph.cxx:329
int m_rotation
the transformed child rotation
Definition: CanvasGraph.cxx:245
bool m_sent
a flag to know if the shape is already send
Definition: CanvasGraph.cxx:281
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:147
std::vector< PathData > m_path
the list of path component
Definition: MWAWGraphicShape.hxx:228
void set(int i, int j, int v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:425
std::map< int, Shape > m_idToShapeMap
the map id to shape
Definition: CanvasGraph.cxx:367
void setInput(MWAWInputStreamPtr &input)
store the actual input
Definition: CanvasGraph.cxx:467
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
@ boldBit
Definition: MWAWFont.hxx:190
int order() const
returns background/foward order
Definition: MWAWPosition.hxx:259
~SubDocument() final
destructor
Definition: CanvasGraph.cxx:393
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition: libmwaw_internal.hxx:512
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
int id() const
returns the id
Definition: MWAWEntry.hxx:164
Shape()
constructor
Definition: CanvasGraph.cxx:70
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
the class to store a color
Definition: libmwaw_internal.hxx:192
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
CanvasGraph & m_graphParser
the graph parser
Definition: CanvasGraph.cxx:412
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
int m_align
the text alignment: 0:left, 1:center, ...
Definition: CanvasGraph.cxx:271
MWAWInputStreamPtr & getInput()
returns the current input
Definition: CanvasGraph.cxx:472
friend std::ostream & operator<<(std::ostream &o, Shape const &s)
operator<<
Definition: CanvasGraph.cxx:150
bool getAverageColor(MWAWColor &col) const
return the average color
Definition: MWAWGraphicStyle.cxx:101
int m_mode
the copy mode (8: copy, 9: xor)
Definition: CanvasGraph.cxx:249
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
CanvasGraph & operator=(CanvasGraph const &orig)=delete
std::string str() const
print the color in the form #rrggbb
Definition: libmwaw_internal.cxx:232
@ Simple
Definition: MWAWFont.hxx:49
bool isWindowsFile() const
returns true if the file is a windows file
Definition: CanvasParser.cxx:577
std::vector< float > m_dashWidth
the dash array: a sequence of (fullsize, emptysize) v3.5
Definition: CanvasGraph.cxx:255
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
bool getBinary(MWAWEmbeddedObject &picture) const override
returns the final picture
Definition: MWAWPictBitmap.hxx:225
void update(CanvasGraphInternal::Shape const &shape, MWAWGraphicStyle &style) const
updates the style corresponding to a shape
Definition: CanvasGraph.cxx:1517
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:292
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
MWAWBox2f m_bdBox
the shape bdbox
Definition: MWAWGraphicShape.hxx:218
void set(int i, int j, MWAWColor const &v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:529
SubDocument & operator=(SubDocument const &orig)=delete
bool readShape(int n, std::vector< MWAWEntry > const &dataZonesList)
try to read a shape: to do
Definition: CanvasGraph.cxx:589
void setOrder(int ord) const
set background/foward order
Definition: MWAWPosition.hxx:264
State()
constructor
Definition: CanvasGraph.cxx:353
@ embossBit
Definition: MWAWFont.hxx:190
@ uppercaseBit
Definition: MWAWFont.hxx:192
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:277
int m_hatchGradChild
the hatch or gradient child
Definition: CanvasGraph.cxx:257
int m_bitmapType
the bitmap type
Definition: CanvasGraph.cxx:273
SubDocument(CanvasGraph &parser, MWAWInputStreamPtr const &input, librevenge::RVNGString const &measure)
constructor from string
Definition: CanvasGraph.cxx:384
MWAWVec2f const & size() const
returns the frame size
Definition: MWAWPosition.hxx:135
@ Polygon
Definition: MWAWGraphicShape.hxx:49
static MWAWGraphicShape polygon(MWAWBox2f const &box)
static constructor to create a polygon
Definition: MWAWGraphicShape.hxx:165
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:206
MWAWGraphicStyle::Arrow m_arrow
the line/arc arrow
Definition: CanvasGraph.cxx:275
SubDocumentType
Definition: libmwaw_internal.hxx:188
MWAWVec2f getOffsetPoint(std::vector< MWAWVec2f > const &vertices, size_t id, float offset)
Internal: given a list of vertices, an indice and an offset computes a new point.
Definition: CanvasGraph.cxx:297
the main class to read the style part of Canvas file
Definition: CanvasStyleManager.hxx:67
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
the main class to read a Canvas 2 and 3 files
Definition: CanvasParser.hxx:64
std::vector< MWAWVec2f > m_points
the points: line, ...
Definition: CanvasGraph.cxx:263
@ initialcaseBit
Definition: MWAWFont.hxx:194
MWAWBox2f m_box
the bounding box
Definition: CanvasGraph.cxx:243
std::vector< int > m_childs
the childs (group 99)
Definition: CanvasGraph.cxx:269
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
CanvasGraph(CanvasGraph const &orig)=delete
@ shadowBit
Definition: MWAWFont.hxx:191
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
bool dumpFile(librevenge::RVNGBinaryData &data, char const *fileName)
a debug function to store in a datafile in the current directory WARNING: this function erase the fil...
Definition: MWAWDebug.cxx:193
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
void setSize(MWAWVec2f const &sz)
sets the frame size
Definition: MWAWPosition.hxx:215
CanvasParser * m_mainParser
the main parser;
Definition: CanvasGraph.hxx:158
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
int m_id
the subdocument id
Definition: CanvasGraph.cxx:414
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:226
#define M_PI
Definition: libmwaw_internal.hxx:52
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
void checkUnsent() const
look for unsent shapes in debug mode
Definition: CanvasGraph.cxx:1495
Type m_type
the type
Definition: MWAWGraphicShape.hxx:216
@ MWAW_R_BAD
Definition: MWAWPict.hxx:73
bool sendSpecial(CanvasGraphInternal::Shape const &shape, CanvasGraphInternal::LocalTransform const &local)
tries to send the special content
Definition: CanvasGraph.cxx:2552
Internal: the subdocument of a CanvasGraph.
Definition: CanvasGraph.cxx:373
int m_dash
the line dash
Definition: CanvasGraph.cxx:253
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
void setOrigin(MWAWVec2f const &orig)
sets the frame origin
Definition: MWAWPosition.hxx:210
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
@ Polyline
Definition: MWAWGraphicShape.hxx:49
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
Internal: the structures of a CanvasGraph.
Definition: CanvasGraph.cxx:66
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:553
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:426
int m_child
the main child (all)
Definition: CanvasGraph.cxx:265
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: CanvasGraph.cxx:422
bool sendShape(int id)
tries to send a shape with id
Definition: CanvasGraph.cxx:477
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
SubDocument(CanvasGraph &parser, MWAWInputStreamPtr const &input, int zoneId)
constructor from a zoneId
Definition: CanvasGraph.cxx:376
void markSent(int id)
mark the id's shape as read in debug mode
Definition: CanvasGraph.cxx:1477
MWAWEntry m_entry
the data zone
Definition: CanvasGraph.cxx:279
Internal: the shape of a CanvasGraph.
Definition: CanvasGraph.cxx:68
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
std::string getTypeName() const
returns the type name
Definition: CanvasGraph.cxx:96
bool send(CanvasGraphInternal::Shape const &shape, CanvasGraphInternal::LocalTransform const *local=nullptr)
tries to send a shape
Definition: CanvasGraph.cxx:1596
bool sendText(CanvasGraphInternal::Shape const &shape)
tries to send the text of a text's shape
Definition: CanvasGraph.cxx:2774
int m_values[2]
the values
Definition: CanvasGraph.cxx:259
static MWAWGraphicShape arc(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:137
virtual ~CanvasGraph()
destructor
Definition: CanvasGraph.cxx:458
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:361
float m_width
the arrow width in point
Definition: MWAWGraphicStyle.hxx:133
bool getBitmap(CanvasGraphInternal::Shape const &shape, MWAWEmbeddedObject &obj)
tries to read the color bitmap stored in 55's shape: v3.5
Definition: CanvasGraph.cxx:1070
static ReadResult check(MWAWInputStreamPtr const &input, int size, MWAWBox2f &box)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:100
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:516
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
int m_type
the shape type
Definition: CanvasGraph.cxx:241
@ italicBit
Definition: MWAWFont.hxx:190
bool sendMultiLines(CanvasGraphInternal::Shape const &shape, CanvasGraphInternal::LocalTransform const &local)
tries the multiligne's special shape: Palm
Definition: CanvasGraph.cxx:2234
Internal: the state of a CanvasGraph.
Definition: CanvasGraph.cxx:351
std::map< int, MWAWGraphicStyle::Gradient > m_idToGradientMap
the map id to gradient
Definition: CanvasGraph.cxx:365
std::shared_ptr< CanvasGraphInternal::State > m_state
the state
Definition: CanvasGraph.hxx:155
a basic gradient used in a MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:139
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:357
static MWAWGraphicShape path(MWAWBox2f const &box)
static constructor to create a path
Definition: MWAWGraphicShape.hxx:173
Gradient m_gradient
the gradient
Definition: MWAWGraphicStyle.hxx:533
int m_patterns[2]
the line, surface pattern
Definition: CanvasGraph.cxx:251
@ Page
Definition: MWAWPosition.hxx:51
@ JustificationFull
Definition: MWAWParagraph.hxx:90
bool sendDimension(CanvasGraphInternal::Shape const &shape, CanvasGraphInternal::LocalTransform const &local)
tries the dimension line's special shape: DIMN
Definition: CanvasGraph.cxx:1907
@ JustificationRight
Definition: MWAWParagraph.hxx:91
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
the main class to read the graphic part of Canvas file
Definition: CanvasGraph.hxx:71
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: MWAWGraphicStyle.hxx:506
bool getBitmapBW(CanvasGraphInternal::Shape const &shape, MWAWEmbeddedObject &obj)
tries to read a bitmap stored in the rectangle's data
Definition: CanvasGraph.cxx:1233
MWAWVec2f const & origin() const
return the frame origin
Definition: MWAWPosition.hxx:130
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
int version() const
returns the file version
Definition: CanvasGraph.cxx:462
MWAWColor m_colors[2]
the color
Definition: CanvasGraph.cxx:261
bool getPicture(CanvasGraphInternal::Shape const &shape, MWAWEmbeddedObject &obj)
tries to read a picture stored in the picture's data
Definition: CanvasGraph.cxx:1433
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
static MWAWGraphicShape polyline(MWAWBox2f const &box)
static constructor to create a polyline
Definition: MWAWGraphicShape.hxx:157
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
bool readString(librevenge::RVNGString &string, int maxSize, bool canBeCString=false)
try to read a pascal string in the data fork or a Pascal/C string depending on the file type
Definition: CanvasParser.cxx:1718
MWAWParserStatePtr m_parserState
the parser state
Definition: CanvasGraph.hxx:152
std::shared_ptr< CanvasStyleManager > m_styleManager
the style manager
Definition: CanvasGraph.hxx:160
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:544
a bitmap of MWAWColor to store true color bitmap
Definition: MWAWPictBitmap.hxx:469
Class to store font.
Definition: MWAWFont.hxx:44
bool readShapes(int numShapes, unsigned long shapeLength, unsigned long dataLength)
try to read the shapes: in fact, the compression header + the list of shapes
Definition: CanvasGraph.cxx:497
MWAWVec2f m_penSize
the pen size
Definition: CanvasGraph.cxx:247
a simple path component
Definition: MWAWGraphicShape.hxx:53
int m_origChild
the child before the transformation
Definition: CanvasGraph.cxx:267
bool hasSurface() const
returns true if the interior surface is defined
Definition: MWAWGraphicStyle.hxx:442
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:120
MWAWInputStreamPtr m_input
the main input
Definition: CanvasGraph.cxx:362
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
CanvasGraph(CanvasParser &parser)
constructor
Definition: CanvasGraph.cxx:450
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
librevenge::RVNGString m_measure
the measure
Definition: CanvasGraph.cxx:416
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
@ lowercaseBit
Definition: MWAWFont.hxx:193
a structure used to define an arrow
Definition: MWAWGraphicStyle.hxx:56
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20