MWAWPictMac Class Reference documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
MWAWPictMac Class Referencefinal

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

`#include <MWAWPictMac.hxx>`

Inheritance diagram for MWAWPictMac:

## Public Member Functions
| ~MWAWPictMac () final
| destructor
SubType | getSubType () const final
| returns the picture subtype
bool | getBinary (MWAWEmbeddedObject &picture) const final
| returns the final picture
bool | valid () const final
| returns true if the picture is valid
int | cmp (MWAWPict const &a) const final
| a virtual function used to obtain a strict order, must be redefined in the subs class
Public Member Functions inherited from MWAWPictData
| ~MWAWPictData () override
| destructor
Type | getType () const override
| 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
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 bool | convertPict1To2 (librevenge::RVNGBinaryData const &orig, librevenge::RVNGBinaryData &result)
| convert a Pict1.0 in Pict2.0, if possible
Static Public Member Functions inherited from MWAWPictData
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
| MWAWPictMac (MWAWBox2f 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 (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 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 1.0, 2.0 or 2.1
Static Protected Member Functions inherited from MWAWPictData
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
int | m_version
| the picture version
int | m_subVersion
| the picture subversion
Protected Attributes inherited from MWAWPictData
librevenge::RVNGBinaryData | 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...
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...

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ ~MWAWPictMac()

MWAWPictMac::~MWAWPictMac | ( |  | ) |
| final

destructor

## ◆ MWAWPictMac()

MWAWPictMac::MWAWPictMac | ( | MWAWBox2f | box | ) |
| inlineexplicitprotected

protected constructor: use check to construct a picture

Referenced by checkOrGet().

## Member Function Documentation

## ◆ checkOrGet()

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

Referenced by MWAWPictData::checkOrGet().

## ◆ cmp()

int MWAWPictMac::cmp | ( | MWAWPict const & | a | ) | const
| inlinefinalvirtual

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

Reimplemented from MWAWPictData.

## ◆ convertPict1To2()

bool MWAWPictMac::convertPict1To2 | ( | librevenge::RVNGBinaryData const & | orig,
|  | librevenge::RVNGBinaryData & | result )
| static

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

Referenced by getBinary().

## ◆ getBinary()

bool MWAWPictMac::getBinary | ( | MWAWEmbeddedObject & | picture | ) | const
| inlinefinalvirtual

returns the final picture

Reimplemented from MWAWPictData.

## ◆ getSubType()

SubType MWAWPictMac::getSubType | ( |  | ) | const
| inlinefinalvirtual

returns the picture subtype

Implements MWAWPictData.

## ◆ valid()

bool MWAWPictMac::valid | ( |  | ) | const
| inlinefinalvirtual

returns true if the picture is valid

Reimplemented from MWAWPictData.

Referenced by getBinary().

## Friends And Related Symbol Documentation

## ◆ MWAWPictData

friend class MWAWPictData
| friend

## Member Data Documentation

## ◆ m_subVersion

int MWAWPictMac::m_subVersion
| protected

the picture subversion

Referenced by cmp().

## ◆ m_version

int MWAWPictMac::m_version
| protected

the picture version

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

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

- MWAWPictMac.hxx
- MWAWPictMac.cxx