Go to the documentation of this file.
34 #ifndef CORELPAINTER_PARSER
35 # define CORELPAINTER_PARSER
40 #include <librevenge/librevenge.h>
103 std::vector<
MWAWColor> &colorList, std::vector<
unsigned char> &previousValues);
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
State()
constructor
Definition: CorelPainterParser.cxx:126
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 readZoneHeader(CorelPainterParserInternal::ZoneHeader &zone)
try to read the header zone
Definition: CorelPainterParser.cxx:1328
~SubDocument() final
destructor
Definition: CorelPainterParser.cxx:149
MWAWEntry m_zone
if valid the zone to parse
Definition: MWAWSubDocument.hxx:79
LineCap m_lineCap
the line cap
Definition: MWAWGraphicStyle.hxx:510
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
@ J_Bevel
Definition: MWAWGraphicStyle.hxx:53
void setColors(std::vector< MWAWColor > const &cols)
sets the array of indexed colors
Definition: MWAWPictBitmap.hxx:446
bool readBitmapRow(CorelPainterParserInternal::ZoneHeader const &zone, std::vector< MWAWColor > &colorList, std::vector< unsigned char > &previousValues)
try to read a bitmap line
Definition: CorelPainterParser.cxx:357
Type
an enum to define the different type of document
Definition: MWAWDocument.hxx:99
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: CorelPainterParser.cxx:170
bool readResourcesList(CorelPainterParserInternal::ZoneHeader &zone)
try to read the list of resource zone (in the data fork)
Definition: CorelPainterParser.cxx:998
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:415
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
@ MWAW_K_PAINT
bitmap graphic
Definition: MWAWDocument.hxx:84
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
bool decompressData(CorelPainterParserInternal::ZoneHeader const &zone, long endPos, int &value, int &buffer, int &numBitsInBuffer)
try to decompress a data
Definition: CorelPainterParser.cxx:481
std::vector< PathData > m_path
the list of path component
Definition: MWAWGraphicShape.hxx:228
MWAWPosition getZonePosition(CorelPainterParserInternal::ZoneHeader const &zone) const
update the position beforing sending a bitmap, shape, ...
Definition: CorelPainterParser.cxx:542
bool m_fillRuleEvenOdd
true if the fill rule is evenod
Definition: MWAWGraphicStyle.hxx:563
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition: libmwaw_internal.hxx:512
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
std::vector< ZoneHeader > m_zoneList
the main zone header
Definition: CorelPainterParser.cxx:132
Internal: a node of a CorelPainterParser.
Definition: CorelPainterParser.cxx:59
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
MWAWEntry m_unicodeEntry
the unicode entry
Definition: CorelPainterParser.cxx:164
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
bool getBinary(MWAWEmbeddedObject &picture) const override
returns the final picture
Definition: MWAWPictBitmap.hxx:225
@ engraveBit
Definition: MWAWFont.hxx:190
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
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
double getMarginLeft() const
returns the left margin
Definition: MWAWPageSpan.hxx:132
bool createZones()
finds the different objects zones
Definition: CorelPainterParser.cxx:280
bool readResource(MWAWEntry &entry)
try to parse the resource data
Definition: CorelPainterParser.cxx:1084
int m_values[2]
the values
Definition: CorelPainterParser.cxx:68
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
bool readDouble(double &res)
try to read a double 1 bytes exponent, 3 mantisse
Definition: CorelPainterParser.cxx:509
float m_lineOpacity
the line opacity: 0=transparent
Definition: MWAWGraphicStyle.hxx:514
int m_pixelByInch
number of pixel by inch
Definition: CorelPainterParser.cxx:134
SubDocument(CorelPainterParser &pars, MWAWInputStreamPtr const &input, MWAWEntry const &entry, MWAWEntry const &unicodeEntry)
Definition: CorelPainterParser.cxx:142
void setRow(int j, MWAWColor const *val)
sets all cell contents of a row
Definition: MWAWPictBitmap.hxx:534
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
std::shared_ptr< CorelPainterParserInternal::State > m_state
the state
Definition: CorelPainterParser.hxx:123
@ J_Round
Definition: MWAWGraphicStyle.hxx:53
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
Internal: the structures of a CorelPainterParser.
Definition: CorelPainterParser.cxx:56
SubDocumentType
Definition: libmwaw_internal.hxx:188
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
double getMarginRight() const
returns the right margin
Definition: MWAWPageSpan.hxx:137
std::shared_ptr< Node > m_childs[2]
the child
Definition: CorelPainterParser.cxx:66
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:401
bool sendText(MWAWEntry const &entry, MWAWEntry const &unicodeEntry)
try to parse the text data
Definition: CorelPainterParser.cxx:653
@ shadowBit
Definition: MWAWFont.hxx:191
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
~CorelPainterParser() final
destructor
Definition: CorelPainterParser.cxx:198
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
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
bool isEmpty() const
return true if the picture contains no data
Definition: libmwaw_internal.hxx:486
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
bool sendBitmap(CorelPainterParserInternal::ZoneHeader const &zone)
try to send a bitmap zone (main bitmap or floater)
Definition: CorelPainterParser.cxx:559
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:284
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
bool readPolygon(long endPos, MWAWGraphicShape &shape, MWAWGraphicStyle &style)
try to read a polygon data
Definition: CorelPainterParser.cxx:1459
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:278
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
Generic function used to define/store a picture.
Definition: MWAWPict.hxx:52
void setRow(int j, U const *val)
sets all cell contents of a row
Definition: MWAWPictBitmap.hxx:430
Definition: libmwaw_internal.hxx:144
SubDocument(SubDocument const &orig)=delete
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: CorelPainterParser.cxx:152
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: CorelPainterParser.cxx:926
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
bool sendZone(CorelPainterParserInternal::ZoneHeader const &zone)
try to send a not bitmap zone
Definition: CorelPainterParser.cxx:599
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
@ C_Square
Definition: MWAWGraphicStyle.hxx:51
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
@ MWAW_T_CORELPAINTER
Corel Painter: Fractal Design Painter Mac v1-v4, MetaCreations Mac v5-v6, Corel Painter Mac v7-v10 an...
Definition: MWAWDocument.hxx:224
std::shared_ptr< CorelPainterParserInternal::Node > readCompressionTree(long endPos, int numNodes)
try to read the Hoffman tree
Definition: CorelPainterParser.cxx:953
@ C_Round
Definition: MWAWGraphicStyle.hxx:51
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
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
@ Page
Definition: MWAWPosition.hxx:51
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
@ JustificationRight
Definition: MWAWParagraph.hxx:91
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
LineJoin m_lineJoin
the line join
Definition: MWAWGraphicStyle.hxx:512
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
void scale(MWAWVec2f const &factor)
rescale all the coordinate
Definition: MWAWGraphicShape.cxx:368
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
the main parser function
Definition: CorelPainterParser.cxx:215
void init()
inits all internal variables
Definition: CorelPainterParser.cxx:202
Internal: the subdocument of a CorelPainterParser.
Definition: CorelPainterParser.cxx:140
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
@ WNone
Definition: MWAWPosition.hxx:53
Definition: MWAWDocument.hxx:57
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: CorelPainterParser.cxx:248
std::shared_ptr< MWAWPict > readBitmap(CorelPainterParserInternal::ZoneHeader const &zone)
try to read a bitmap
Definition: CorelPainterParser.cxx:306
CorelPainterParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: CorelPainterParser.cxx:191
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
a bitmap of MWAWColor to store true color bitmap
Definition: MWAWPictBitmap.hxx:469
Class to store font.
Definition: MWAWFont.hxx:44
SubDocument & operator=(SubDocument const &orig)=delete
a simple path component
Definition: MWAWGraphicShape.hxx:53
the main class to read a Painter's file, actually, read Fractal Design Painter 1-4,...
Definition: CorelPainterParser.hxx:63
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
Internal: the state of a CorelPainterParser.
Definition: CorelPainterParser.cxx:124
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
Node()
constructor
Definition: CorelPainterParser.cxx:61
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20