MWAWPictData Class Referenceabstract

an abstract class which defines basic formated picture ( AppleŠ Pict, DB3, ...) More...

`#include <MWAWPictData.hxx>`

Inheritance diagram for MWAWPictData:

## Public Types

enum | SubType { PictMac, DB3, Unknown }
| the picture subtype More...
Public Types inherited from MWAWPict
enum | Type { Basic, PictData, Bitmap, OleContainer, 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...

## Public Member Functions

virtual Type | getType () const
| returns the picture type More...
virtual SubType | getSubType () const =0
| returns the picture subtype More...
virtual bool | getBinary (WPXBinaryData &res, std::string &s) const
| returns the final WPXBinary data More...
virtual bool | sure () const
| returns true if we are relatively sure that the data are correct More...
virtual bool | valid () const
| returns true if the picture is valid More...
bool | isEmpty () const
| returns true if the picture is valid and has size 0 or contains no data 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...
Public Member Functions inherited from MWAWPict
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 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

| MWAWPictData ()
| protected constructor: use check to construct a picture More...
| MWAWPictData (Box2f &)
Protected Member Functions inherited from MWAWPict
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 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 Protected Member Functions inherited from MWAWPict
static Box2f | getBdBox (int numPt, Vec2f const *pt)
| computes the minimum and maximum of a list of point More...

## Protected Attributes

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...

## Detailed Description

an abstract class which defines basic formated picture ( AppleŠ Pict, DB3, ...)

## Member Enumeration Documentation

enum MWAWPictData::SubType

the picture subtype

Enumerator
PictMac |
DB3 |
Unknown |

## Constructor & Destructor Documentation

MWAWPictData::MWAWPictData | ( |  | ) |

inline protected

protected constructor: use check to construct a picture

MWAWPictData::MWAWPictData | ( | Box2f & |  | ) |

inline protected

## Member Function Documentation

static ReadResult MWAWPictData::check | ( | MWAWInputStreamPtr | input,
|  | int | size,
|  | Box2f & | box
| ) |  |

inline static

checks if the data pointed by input is known

- if not return MWAW_R_BAD
- if true
- fills box if possible, if not set box=Box2f()

Referenced by MCDParser::createZones(), MSKGraphInternal::DataPict::getBinaryData(), MWAWOLEParser::parse(), MWParser::readGraphic(), WPParser::readGraphic(), MORParser::readGraphic(), CWGraph::readPICT(), ACText::sendGraphic(), FWGraph::sendGraphic(), NSGraph::sendPageGraphics(), MCDParser::sendPicture(), EDParser::sendPicture(), TTParser::sendPicture(), DMParser::sendPicture(), and MSWParser::sendPicture().

MWAWPictData::ReadResult MWAWPictData::checkOrGet | ( | MWAWInputStreamPtr | input,
|  | int | size,
|  | Box2f & | box,
|  | MWAWPictData ** | result = `0L`
| ) |  |

static protected

checks if the data pointed by input and of given size is a pict

- if not returns MWAW_R_BAD
- if true
  - fills the box size
  - creates a picture if result is given and if the picture is not empty

Referenced by check(), and get().

virtual int MWAWPictData::cmp | ( | MWAWPict const & | a | ) | const

inline virtual

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

Reimplemented from MWAWPict.

Reimplemented in MWAWPictDUnknown, MWAWPictDB3, and MWAWPictMac.

Referenced by MWAWPictMac::cmp(), MWAWPictDB3::cmp(), and MWAWPictDUnknown::cmp().

bool MWAWPictData::createFileData | ( | WPXBinaryData const & | orig,
|  | WPXBinaryData & | result
| ) |  |

static protected

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

Referenced by MWAWPictMac::getBinary(), and getBinary().

static MWAWPictData* MWAWPictData::get | ( | MWAWInputStreamPtr | input,
|  | int | size
| ) |  |

inline static

checks if the data pointed by input is known

- if not or if the pict is empty, returns 0L
- if not returns a container of picture

Referenced by MSKGraphInternal::DataPict::getBinaryData(), MDWParser::readGraphic(), MWParser::readGraphic(), WPParser::readGraphic(), WNText::readTokenV2(), FWGraph::sendGraphic(), LWGraph::sendPICT(), MCDParser::sendPicture(), EDParser::sendPicture(), TTParser::sendPicture(), DMParser::sendPicture(), GWGraph::sendPicture(), WNParser::sendPicture(), MSWParser::sendPicture(), MWProParser::sendPicture(), and CWGraph::sendPicture().

virtual bool MWAWPictData::getBinary | ( | WPXBinaryData & | res,
|  | std::string & | s
| ) |  | const

inline virtual

returns the final WPXBinary data

Reimplemented from MWAWPict.

Reimplemented in MWAWPictMac.

virtual SubType MWAWPictData::getSubType | ( |  | ) | const

pure virtual

returns the picture subtype

Implemented in MWAWPictDUnknown, MWAWPictDB3, and MWAWPictMac.

Referenced by cmp(), and sure().

virtual Type MWAWPictData::getType | ( |  | ) | const

inline virtual

returns the picture type

Implements MWAWPict.

bool MWAWPictData::isEmpty | ( |  | ) | const

inline

returns true if the picture is valid and has size 0 or contains no data

Referenced by MWAWPictMac::getBinary(), and getBinary().

virtual bool MWAWPictData::sure | ( |  | ) | const

inline virtual

returns true if we are relatively sure that the data are correct

virtual bool MWAWPictData::valid | ( |  | ) | const

inline virtual

returns true if the picture is valid

Reimplemented in MWAWPictDUnknown, MWAWPictDB3, and MWAWPictMac.

Referenced by getBinary().

## Member Data Documentation

WPXBinaryData MWAWPictData::m_data

protected

the data size (without the empty header of 512 characters)

Referenced by cmp(), MWAWPictMac::getBinary(), getBinary(), MWAWPictDB3::valid(), and MWAWPictDUnknown::valid().

bool MWAWPictData::m_empty

protected

some picture can be valid but empty

Referenced by cmp(), isEmpty(), MWAWPictDB3::MWAWPictDB3(), and MWAWPictDUnknown::MWAWPictDUnknown().

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

- MWAWPictData.hxx
- MWAWPictData.cxx