Class to read/store a Mac Pict1.0/2.0. More...
#include <MWAWPictMac.hxx>
Public Member Functions | |
virtual SubType | getSubType () const |
returns the picture subtype More... | |
virtual bool | getBinary (WPXBinaryData &res, std::string &s) const |
returns the final WPXBinary data More... | |
virtual bool | valid () const |
returns true if the picture is valid More... | |
virtual int | cmp (MWAWPict const &a) const |
a virtual function used to obtain a strict order, must be redefined in the subs class More... | |
![]() | |
virtual Type | getType () const |
returns the picture type More... | |
virtual bool | sure () const |
returns true if we are relatively sure that the data are correct More... | |
bool | isEmpty () const |
returns true if the picture is valid and has size 0 or contains no data More... | |
![]() | |
virtual | ~MWAWPict () |
virtual destructor More... | |
Box2f | getBdBox () const |
returns the bdbox of the picture More... | |
void | setBdBox (Box2f const &box) |
sets the bdbox of the picture More... | |
Static Public Member Functions | |
static bool | convertPict1To2 (WPXBinaryData const &orig, WPXBinaryData &result) |
convert a Pict1.0 in Pict2.0, if possible More... | |
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 step, if we want convert such a Pict in a Odg picture More... | |
static void | parsePict2 (WPXBinaryData const &orig, std::string const &fname) |
tries to parse a Pict2. More... | |
![]() | |
static ReadResult | check (MWAWInputStreamPtr input, int size, Box2f &box) |
checks if the data pointed by input is known More... | |
static MWAWPictData * | get (MWAWInputStreamPtr input, int size) |
checks if the data pointed by input is known More... | |
Protected Member Functions | |
MWAWPictMac (Box2f box) | |
protected constructor: use check to construct a picture More... | |
![]() | |
MWAWPictData () | |
protected constructor: use check to construct a picture More... | |
MWAWPictData (Box2f &) | |
![]() | |
void | extendBDBox (float val) |
udaptes the bdbox, by extended it by (val-previousVal) More... | |
MWAWPict () | |
protected constructor must not be called directly More... | |
MWAWPict (MWAWPict const &p) | |
protected constructor must not be called directly More... | |
MWAWPict & | operator= (MWAWPict const &p) |
protected operator= must not be called directly More... | |
Static Protected Member Functions | |
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 More... | |
![]() | |
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 conversion needed to return the final picture More... | |
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 More... | |
![]() | |
static Box2f | getBdBox (int numPt, Vec2f const *pt) |
computes the minimum and maximum of a list of point More... | |
Protected Attributes | |
int | m_version |
the picture version More... | |
int | m_subVersion |
the picture subversion More... | |
![]() | |
WPXBinaryData | m_data |
the data size (without the empty header of 512 characters) More... | |
bool | m_empty |
some picture can be valid but empty More... | |
Friends | |
class | MWAWPictData |
Additional Inherited Members | |
![]() | |
enum | SubType { PictMac, DB3, Unknown } |
the picture subtype More... | |
![]() | |
enum | Type { PictData, Bitmap, Unknown } |
the different picture types: More... | |
enum | ReadResult { MWAW_R_BAD =0, MWAW_R_OK, MWAW_R_OK_EMPTY, MWAW_R_MAYBE } |
an enum to defined the result of a parsing use by some picture's classes which can read their data More... | |
Class to read/store a Mac Pict1.0/2.0.
|
inlineprotected |
protected constructor: use check to construct a picture
|
staticprotected |
checks if the data pointed by input and of given size is a pict 1.0, 2.0 or 2.1
Referenced by MWAWPictData::checkOrGet().
|
inlinevirtual |
a virtual function used to obtain a strict order, must be redefined in the subs class
Reimplemented from MWAWPictData.
|
static |
convert a Pict1.0 in Pict2.0, if possible
Referenced by getBinary().
|
inlinevirtual |
returns the final WPXBinary data
Reimplemented from MWAWPictData.
|
inlinevirtual |
returns the picture subtype
Implements MWAWPictData.
|
static |
tries to parse a Pict1.0 and dump the file Actually mainly used for debugging, but will be a first step, if we want convert such a Pict in a Odg picture
Referenced by convertPict1To2().
|
static |
tries to parse a Pict2.
and dump the file Actually mainly used for debugging, but will be a first step, if we want convert such a Pict in a Odg picture
|
inlinevirtual |
|
friend |
|
protected |
the picture subversion
Referenced by checkOrGet(), and cmp().
|
protected |
the picture version
Referenced by checkOrGet(), cmp(), getBinary(), and valid().