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

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

## Static Public Member Functions
static ReadResult | check (MWAWInputStreamPtr const &input, int size, MWAWBox2f &box)
| checks if the data pointed by input is known
static MWAWPictData * | get (MWAWInputStreamPtr const &input, int size)
| checks if the data pointed by input is known

## Protected Member Functions
| MWAWPictData ()
| protected constructor: use check to construct a picture
| MWAWPictData (MWAWBox2f &)
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
MWAWPict & | operator= (MWAWPict const &p)
| protected operator= must not be called directly

## Static Protected Member Functions
static bool | createFileData (librevenge::RVNGBinaryData const &orig, librevenge::RVNGBinaryData &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 ReadResult | checkOrGet (MWAWInputStreamPtr input, int size, MWAWBox2f &box, MWAWPictData **result=nullptr)
| checks if the data pointed by input and of given size is a pict
Static Protected Member Functions inherited from MWAWPict
static MWAWBox2f | getBdBox (int numPt, MWAWVec2f const *pt)
| computes the minimum and maximum of a list of point

## Protected Attributes
librevenge::RVNGBinaryData | m_data
| the data size (without the empty header of 512 characters)
bool | m_empty
| some picture can be valid but empty

## Detailed Description

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

## Member Enumeration Documentation

## ◆ SubType

enum MWAWPictData::SubType

the picture subtype

Enumerator
PictMac |
DB3 |
Unknown |

## Constructor & Destructor Documentation

## ◆ ~MWAWPictData()

MWAWPictData::~MWAWPictData | ( |  | ) |
| override

destructor

## ◆ MWAWPictData() [1/2]

MWAWPictData::MWAWPictData | ( |  | ) |
| inline protected

protected constructor: use check to construct a picture

Referenced by checkOrGet(), cmp(), and get().

## ◆ MWAWPictData() [2/2]

MWAWPictData::MWAWPictData | ( | MWAWBox2f & |  | ) |
| inline explicit protected

## Member Function Documentation

## ◆ check()

ReadResult MWAWPictData::check | ( | MWAWInputStreamPtr const & | input,
|  | int | size,
|  | MWAWBox2f & | 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=MWAWBox2f()

Referenced by GreatWksBMParser::checkHeader(), MacDrawParser::checkHeader(), MacDrawProParser::checkHeader(), MacDocParser::createZones(), MsWksGraphInternal::DataPict::getBinaryData(), CanvasGraph::getPicture(), MWAWOLEParser::parse(), MacWrtParser::readGraphic(), MoreParser::readGraphic(), WriterPlsParser::readGraphic(), ClarisWksGraph::readPICT(), MsWksTable::sendChart(), ActaText::sendGraphic(), FullWrtGraph::sendGraphic(), NisusWrtGraph::sendPageGraphics(), DocMkrParser::sendPicture(), EDocParser::sendPicture(), MacDocParser::sendPicture(), MsWrdParser::sendPicture(), RagTimeParser::sendPicture(), TeachTxtParser::sendPicture(), and DrawTableParser::sendShape().

## ◆ checkOrGet()

MWAWPictData::ReadResult MWAWPictData::checkOrGet | ( | MWAWInputStreamPtr | input,
|  | int | size,
|  | MWAWBox2f & | box,
|  | MWAWPictData ** | result = nullptr )
| 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().

## ◆ cmp()

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

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

Reimplemented from MWAWPict.

Reimplemented in MWAWPictDB3, MWAWPictDUnknown, and MWAWPictMac.

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

## ◆ createFileData()

bool MWAWPictData::createFileData | ( | librevenge::RVNGBinaryData const & | orig,
|  | librevenge::RVNGBinaryData & | 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 getBinary(), and MWAWPictMac::getBinary().

## ◆ get()

MWAWPictData * MWAWPictData::get | ( | MWAWInputStreamPtr const & | 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 MsWksGraphInternal::DataPict::getBinaryData(), CanvasGraph::getPicture(), JazzWriterParser::getPicture(), MacWrtParser::readGraphic(), MindWrtParser::readGraphic(), WriterPlsParser::readGraphic(), Canvas5Parser::readPicture(), StudentWritingCParser::readPicture(), WordMakerParser::readPicture(), WriteNowText::readTokenV2(), ReadySetGoGraph::send(), ScriptWriterParser::send(), MsWksTable::sendChart(), SpringBoardParser::sendFrame(), FullWrtGraph::sendGraphic(), ClarisDrawGraph::sendGroup(), ClarisDrawGraph::sendMainGroupChild(), LightWayTxtGraph::sendPICT(), ClarisWksGraph::sendPicture(), DocMkrParser::sendPicture(), EDocParser::sendPicture(), GreatWksBMParser::sendPicture(), GreatWksGraph::sendPicture(), MacDocParser::sendPicture(), MacWrtProParser::sendPicture(), MsWrdParser::sendPicture(), RagTimeParser::sendPicture(), TeachTxtParser::sendPicture(), WriteNowParser::sendPicture(), BeagleWksDRParser::sendPictures(), SuperPaintParser::sendPictures(), DrawTableParser::sendShape(), and MoreText::sendText().

## ◆ getBinary()

bool MWAWPictData::getBinary | ( | MWAWEmbeddedObject & | picture | ) | const
| inline override virtual

returns the final picture

Reimplemented from MWAWPict.

Reimplemented in MWAWPictMac.

## ◆ getSubType()

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

returns the picture subtype

Implemented in MWAWPictDB3, MWAWPictDUnknown, and MWAWPictMac.

Referenced by cmp(), and sure().

## ◆ getType()

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

returns the picture type

Implements MWAWPict.

## ◆ isEmpty()

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

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

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

## ◆ sure()

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

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

## ◆ valid()

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

returns true if the picture is valid

Reimplemented in MWAWPictDB3, MWAWPictDUnknown, and MWAWPictMac.

Referenced by getBinary().

## Member Data Documentation

## ◆ m_data

librevenge::RVNGBinaryData MWAWPictData::m_data
| protected

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

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

## ◆ m_empty

bool MWAWPictData::m_empty
| protected

some picture can be valid but empty

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

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

- MWAWPictData.hxx
- MWAWPictData.cxx