38 #ifndef MWAW_PICT_MWAW
39 # define MWAW_PICT_MWAW
45 # include <libwpd/libwpd.h>
61 virtual bool getBinary(WPXBinaryData &res, std::string &s)
const {
85 if (diff)
return diff;
89 if (diff)
return (diff < 0) ? -1 : 1;
91 if (diff)
return (diff < 0) ? -1 : 1;
97 static bool convertPict1To2(WPXBinaryData
const &orig, WPXBinaryData &result);
102 static void parsePict1(WPXBinaryData
const &orig, std::string
const &fname);
107 static void parsePict2(WPXBinaryData
const &orig, std::string
const &fname);
virtual SubType getSubType() const
returns the picture subtype
Definition: MWAWPictMac.hxx:56
virtual bool valid() const
returns true if the picture is valid
Definition: MWAWPictMac.hxx:77
Class to read/store a Mac Pict1.0/2.0.
Definition: MWAWPictMac.hxx:51
ReadResult
an enum to defined the result of a parsing use by some picture's classes which can read their data ...
Definition: MWAWPict.hxx:74
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order, must be redefined in the subs class ...
Definition: MWAWPictMac.hxx:83
int m_subVersion
the picture subversion
Definition: MWAWPictMac.hxx:128
MWAWPictMac(Box2f box)
protected constructor: use check to construct a picture
Definition: MWAWPictMac.hxx:111
static void parsePict1(WPXBinaryData const &orig, std::string const &fname)
tries to parse a Pict1.0 and dump the file Actually mainly used for debugging, but will be a first st...
Definition: MWAWPictMac.cxx:2088
int m_version
the picture version
Definition: MWAWPictMac.hxx:126
static ReadResult checkOrGet(MWAWInputStreamPtr input, int size, Box2f &box, MWAWPictData **result=0L)
checks if the data pointed by input and of given size is a pict 1.0, 2.0 or 2.1
Definition: MWAWPictMac.cxx:57
Definition: MWAWPictData.hxx:59
static bool createFileData(WPXBinaryData const &orig, WPXBinaryData &result)
a file pict can be created from the data pict by adding a header with size 512, this function do this...
Definition: MWAWPictData.cxx:45
an abstract class which defines basic formated picture ( AppleŠ Pict, DB3, ...)
Definition: MWAWPictData.hxx:55
static void parsePict2(WPXBinaryData const &orig, std::string const &fname)
tries to parse a Pict2.
Definition: MWAWPictMac.cxx:2098
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order, must be redefined in the subs class ...
Definition: MWAWPictData.hxx:115
WPXBinaryData m_data
the data size (without the empty header of 512 characters)
Definition: MWAWPictData.hxx:157
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:348
SubType
the picture subtype
Definition: MWAWPictData.hxx:59
bool isEmpty() const
returns true if the picture is valid and has size 0 or contains no data
Definition: MWAWPictData.hxx:87
virtual bool getBinary(WPXBinaryData &res, std::string &s) const
returns the final WPXBinary data
Definition: MWAWPictMac.hxx:61
void extendBDBox(float val)
udaptes the bdbox, by extended it by (val-previousVal)
Definition: MWAWPict.hxx:133
static bool convertPict1To2(WPXBinaryData const &orig, WPXBinaryData &result)
convert a Pict1.0 in Pict2.0, if possible
Definition: MWAWPictMac.cxx:2108
Generic function used to define/store a picture.
Definition: MWAWPict.hxx:52