MWAWPictMac Class Reference

Class to read/store a Mac Pict1.0/2.0. More...

#include <MWAWPictMac.hxx>

Inheritance diagram for MWAWPictMac:
MWAWPictData MWAWPict

Public Member Functions

virtual SubType getSubType () const
 returns the picture subtype
virtual bool getBinary (WPXBinaryData &res, std::string &s) const
 returns the final WPXBinary data
virtual bool valid () const
 returns true if the picture is valid
virtual int cmp (MWAWPict const &a) const
 a virtual function used to obtain a strict order, must be redefined in the subs class
- Public Member Functions inherited from MWAWPictData
virtual Type getType () const
 returns the picture type
virtual bool sure () const
 returns true if we are relatively sure that the data are correct
bool isEmpty () const
 returns true if the picture is valid and has size 0 or contains no data
- Public Member Functions inherited from MWAWPict
virtual ~MWAWPict ()
 virtual destructor
Box2f getBdBox () const
 returns the bdbox of the picture
void setBdBox (Box2f const &box)
 sets the bdbox of the picture

Static Public Member Functions

static bool convertPict1To2 (WPXBinaryData const &orig, WPXBinaryData &result)
 convert a Pict1.0 in Pict2.0, if possible
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
static void parsePict2 (WPXBinaryData const &orig, std::string const &fname)
 tries to parse a Pict2.
- Static Public Member Functions inherited from MWAWPictData
static ReadResult check (MWAWInputStreamPtr input, int size, Box2f &box)
 checks if the data pointed by input is known
static MWAWPictDataget (MWAWInputStreamPtr input, int size)
 checks if the data pointed by input is known

Protected Member Functions

 MWAWPictMac (Box2f box)
 protected constructor: use check to construct a picture
- Protected Member Functions inherited from MWAWPictData
 MWAWPictData ()
 protected constructor: use check to construct a picture
 MWAWPictData (Box2f &)
- Protected Member Functions inherited from MWAWPict
void extendBDBox (float val)
 udaptes the bdbox, by extended it by (val-previousVal)
 MWAWPict ()
 protected constructor must not be called directly
 MWAWPict (MWAWPict const &p)
 protected constructor must not be called directly
MWAWPictoperator= (MWAWPict const &p)
 protected operator= must not be called directly

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
- Static Protected Member Functions inherited from MWAWPictData
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
- Static Protected Member Functions inherited from MWAWPict
static Box2f getBdBox (int numPt, Vec2f const *pt)
 computes the minimum and maximum of a list of point

Protected Attributes

int m_version
 the picture version
int m_subVersion
 the picture subversion
- Protected Attributes inherited from MWAWPictData
WPXBinaryData m_data
 the data size (without the empty header of 512 characters)
bool m_empty
 some picture can be valid but empty

Friends

class MWAWPictData

Additional Inherited Members

- Public Types inherited from MWAWPictData
enum  SubType { PictMac, DB3, Unknown }
 the picture subtype More...

Detailed Description

Class to read/store a Mac Pict1.0/2.0.

Constructor & Destructor Documentation

MWAWPictMac::MWAWPictMac ( Box2f  box)
inlineprotected

protected constructor: use check to construct a picture

Member Function Documentation

MWAWPictMac::ReadResult MWAWPictMac::checkOrGet ( MWAWInputStreamPtr  input,
int  size,
Box2f box,
MWAWPictData **  result = 0L 
)
staticprotected

checks if the data pointed by input and of given size is a pict 1.0, 2.0 or 2.1

  • if not returns MWAW_R_BAD
  • if true
  • fills box if possible
  • creates a picture if result is given

Reimplemented from MWAWPictData.

Referenced by MWAWPictData::checkOrGet().

virtual int MWAWPictMac::cmp ( MWAWPict const &  a) const
inlinevirtual

a virtual function used to obtain a strict order, must be redefined in the subs class

Reimplemented from MWAWPictData.

bool MWAWPictMac::convertPict1To2 ( WPXBinaryData const &  orig,
WPXBinaryData &  result 
)
static

convert a Pict1.0 in Pict2.0, if possible

Referenced by getBinary().

virtual bool MWAWPictMac::getBinary ( WPXBinaryData &  res,
std::string &  s 
) const
inlinevirtual

returns the final WPXBinary data

Reimplemented from MWAWPictData.

virtual SubType MWAWPictMac::getSubType ( ) const
inlinevirtual

returns the picture subtype

Implements MWAWPictData.

void MWAWPictMac::parsePict1 ( WPXBinaryData const &  orig,
std::string const &  fname 
)
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().

void MWAWPictMac::parsePict2 ( WPXBinaryData const &  orig,
std::string const &  fname 
)
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

virtual bool MWAWPictMac::valid ( ) const
inlinevirtual

returns true if the picture is valid

Reimplemented from MWAWPictData.

Referenced by getBinary().

Friends And Related Function Documentation

friend class MWAWPictData
friend

Member Data Documentation

int MWAWPictMac::m_subVersion
protected

the picture subversion

Referenced by checkOrGet(), and cmp().

int MWAWPictMac::m_version
protected

the picture version

Referenced by checkOrGet(), cmp(), getBinary(), and valid().


The documentation for this class was generated from the following files:

Generated on Wed May 22 2013 18:12:46 for libmwaw by doxygen 1.8.1.2