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

the main class to read a ApplePict file More...

`#include <ApplePictParser.hxx>`

Inheritance diagram for ApplePictParser:

## Public Types
enum | DrawingMethod { D_FRAME, D_PAINT, D_ERASE, D_INVERT, D_FILL, D_TEXT, D_UNDEFINED }
| the drawing method: frame, paint, ... More...

## Public Member Functions
| ApplePictParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor More...
| ~ApplePictParser () final
| destructor More...
bool | checkHeader (MWAWHeader *header, bool strict=false) final
| checks if the document header is correct (or not) More...
void | parse (librevenge::RVNGDrawingInterface *documentInterface) final
| the main parse function More...
Public Member Functions inherited from MWAWGraphicParser
| ~MWAWGraphicParser () override
| destructor More...
Public Member Functions inherited from MWAWParser
virtual | ~MWAWParser ()
| virtual destructor More...
int | version () const
| returns the works version More...
MWAWParserStatePtr | getParserState ()
| returns the parser state More...
MWAWHeader * | getHeader ()
| returns the header More...
MWAWInputStreamPtr & | getInput ()
| returns the actual input More...
MWAWListenerPtr | getMainListener ()
| returns the main listener More...
MWAWGraphicListenerPtr & | getGraphicListener ()
| returns the graphic listener More...
MWAWPresentationListenerPtr & | getPresentationListener ()
| returns the presentation listener More...
MWAWSpreadsheetListenerPtr & | getSpreadsheetListener ()
| returns the spreadsheet listener More...
MWAWTextListenerPtr & | getTextListener ()
| returns the text listener More...
MWAWFontConverterPtr & | getFontConverter ()
| returns the font converter More...
MWAWFontManagerPtr & | getFontManager ()
| returns the font manager More...
MWAWPageSpan const & | getPageSpan () const
| returns the actual page dimension More...
MWAWPageSpan & | getPageSpan ()
| returns the actual page dimension More...
double | getFormLength () const
| returns the form length More...
double | getFormWidth () const
| returns the form width More...
double | getPageLength () const
| returns the page length (form length without margin ) More...
double | getPageWidth () const
| returns the page width (form width without margin ) More...
MWAWRSRCParserPtr & | getRSRCParser ()
| returns the rsrc parser More...
libmwaw::DebugFile & | ascii ()
| a DebugFile used to write what we recognize when we parse the document More...

## Protected Member Functions
bool | readZone ()
| try to read a zone More...
void | init ()
| inits all internal variables More...
void | createDocument (librevenge::RVNGDrawingInterface *documentInterface)
| creates the listener which will be associated to the document More...
bool | createZones ()
| finds the different objects zones More...
void | drawLine (MWAWVec2i const &pt)
| draw a line from current position to position More...
bool | readAndDrawRectangle (DrawingMethod method)
| read the current rectangle and draw it More...
void | drawRectangle (DrawingMethod method)
| draw the current rectangle More...
bool | readAndDrawRoundRectangle (DrawingMethod method)
| read the current round rectangle and draw it More...
void | drawRoundRectangle (DrawingMethod method)
| draw the current round rectangle More...
bool | readAndDrawCircle (DrawingMethod method)
| read the current circle and draw it More...
void | drawCircle (DrawingMethod method)
| draw the current circle More...
bool | readAndDrawPie (DrawingMethod method)
| read the current pie and draw it More...
void | drawPie (DrawingMethod method, int startAngle, int dAngle)
| draw the current circle More...
bool | readAndDrawPolygon (DrawingMethod method)
| read the current polygon and draw it More...
void | drawPolygon (DrawingMethod method)
| draw the current polygon More...
bool | readAndDrawText (std::string &text)
| read the current text and draw it More...
void | drawText (MWAWEntry const &entry)
| draw a current text More...
void | drawBitmap (ApplePictParserInternal::Bitmap const &bitmap)
| draw a bitmap More...
void | drawPixmap (ApplePictParserInternal::Pixmap const &pixmap)
| draw a pixmap More...
bool | readRGBColor (MWAWColor &color)
| try to read a rgb color More...
bool | readBWPattern (MWAWGraphicStyle::Pattern &pattern)
| try to read a bw pattern More...
bool | readColorPattern (MWAWGraphicStyle::Pattern &pattern)
| try to read a color pattern More...
bool | readRegion (ApplePictParserInternal::Region &region)
| try to read a region More...
bool | readBitmap (ApplePictParserInternal::Bitmap &bitmap, bool isPacked, bool hasRgn)
| read a bitmap More...
bool | readPixmap (ApplePictParserInternal::Pixmap &pixmap, bool isPacked, bool haColorTable, bool hasRectMode, bool hasRgn)
| read a pixmap More...
bool | readQuicktime (MWAWEmbeddedObject &object, MWAWBox2f &bdBox)
| try to read a quicktime zone More...
Protected Member Functions inherited from MWAWGraphicParser
| MWAWGraphicParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor (protected) More...
| MWAWGraphicParser (MWAWParserStatePtr const &state)
| constructor using a state More...
Protected Member Functions inherited from MWAWParser
| MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor (protected) More...
| MWAWParser (MWAWParserStatePtr const &state)
| constructor using a state More...
void | setVersion (int vers)
| sets the document's version More...
void | setGraphicListener (MWAWGraphicListenerPtr &listener)
| sets the graphic listener More...
void | resetGraphicListener ()
| resets the listener More...
void | setPresentationListener (MWAWPresentationListenerPtr &listener)
| sets the presentation listener More...
void | resetPresentationListener ()
| resets the listener More...
void | setSpreadsheetListener (MWAWSpreadsheetListenerPtr &listener)
| sets the spreadsheet listener More...
void | resetSpreadsheetListener ()
| resets the listener More...
void | setTextListener (MWAWTextListenerPtr &listener)
| sets the text listener More...
void | resetTextListener ()
| resets the listener More...
void | setAsciiName (char const *name)
| Debugging: change the default ascii file. More...
std::string const & | asciiName () const
| return the ascii file name More...

## Static Protected Member Functions
static std::string | getDrawingName (DrawingMethod method)
| debug function to print a drawing method More...
static std::string | getModeName (int mode)
| debug function to print a mode name More...

## Protected Attributes
std::shared_ptr< ApplePictParserInternal::State > | m_state
| the state More...

## Friends
class | ApplePictParserInternal::SubDocument

## Detailed Description

the main class to read a ApplePict file

## Member Enumeration Documentation

## ◆ DrawingMethod

enum ApplePictParser::DrawingMethod

the drawing method: frame, paint, ...

Enumerator
D_FRAME |
D_PAINT |
D_ERASE |
D_INVERT |
D_FILL |
D_TEXT |
D_UNDEFINED |

## Constructor & Destructor Documentation

## ◆ ApplePictParser()

ApplePictParser::ApplePictParser | ( | MWAWInputStreamPtr const & | input,
|  | MWAWRSRCParserPtr const & | rsrcParser,
|  | MWAWHeader * | header
| ) |  |

constructor

## ◆ ~ApplePictParser()

ApplePictParser::~ApplePictParser | ( |  | ) |
| final

destructor

## Member Function Documentation

## ◆ checkHeader()

bool ApplePictParser::checkHeader | ( | MWAWHeader * | header,
|  | bool | strict = `false`
| ) |  |
| final virtual

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by parse().

## ◆ createDocument()

void ApplePictParser::createDocument | ( | librevenge::RVNGDrawingInterface * | documentInterface | ) |
| protected

creates the listener which will be associated to the document

Referenced by parse().

## ◆ createZones()

bool ApplePictParser::createZones | ( |  | ) |
| protected

finds the different objects zones

Referenced by parse().

## ◆ drawBitmap()

void ApplePictParser::drawBitmap | ( | ApplePictParserInternal::Bitmap const & | bitmap | ) |
| protected

draw a bitmap

Referenced by readZone().

## ◆ drawCircle()

void ApplePictParser::drawCircle | ( | ApplePictParser::DrawingMethod | method | ) |
| protected

draw the current circle

Referenced by readAndDrawCircle(), and readZone().

## ◆ drawLine()

void ApplePictParser::drawLine | ( | MWAWVec2i const & | pt | ) |
| protected

draw a line from current position to position

Referenced by readZone().

## ◆ drawPie()

void ApplePictParser::drawPie | ( | DrawingMethod | method,
|  | int | startAngle,
|  | int | dAngle
| ) |  |
| protected

draw the current circle

Referenced by readAndDrawPie(), and readZone().

## ◆ drawPixmap()

void ApplePictParser::drawPixmap | ( | ApplePictParserInternal::Pixmap const & | pixmap | ) |
| protected

draw a pixmap

Referenced by readZone().

## ◆ drawPolygon()

void ApplePictParser::drawPolygon | ( | ApplePictParser::DrawingMethod | method | ) |
| protected

draw the current polygon

Referenced by readAndDrawPolygon(), and readZone().

## ◆ drawRectangle()

void ApplePictParser::drawRectangle | ( | ApplePictParser::DrawingMethod | method | ) |
| protected

draw the current rectangle

Referenced by readAndDrawRectangle(), and readZone().

## ◆ drawRoundRectangle()

void ApplePictParser::drawRoundRectangle | ( | ApplePictParser::DrawingMethod | method | ) |
| protected

draw the current round rectangle

Referenced by readAndDrawRoundRectangle(), and readZone().

## ◆ drawText()

void ApplePictParser::drawText | ( | MWAWEntry const & | entry | ) |
| protected

draw a current text

## ◆ getDrawingName()

static std::string ApplePictParser::getDrawingName | ( | DrawingMethod | method | ) |
| inline static protected

debug function to print a drawing method

Referenced by readAndDrawCircle(), readAndDrawPie(), readAndDrawPolygon(), readAndDrawRectangle(), readAndDrawRoundRectangle(), and readZone().

## ◆ getModeName()

std::string ApplePictParser::getModeName | ( | int | mode | ) |
| static protected

debug function to print a mode name

Referenced by readBitmap(), readPixmap(), and readZone().

## ◆ init()

void ApplePictParser::init | ( |  | ) |
| protected

inits all internal variables

Referenced by ApplePictParser().

## ◆ parse()

void ApplePictParser::parse | ( | librevenge::RVNGDrawingInterface * | documentInterface | ) |
| final virtual

the main parse function

Implements MWAWGraphicParser.

## ◆ readAndDrawCircle()

bool ApplePictParser::readAndDrawCircle | ( | ApplePictParser::DrawingMethod | method | ) |
| protected

read the current circle and draw it

Referenced by readZone().

## ◆ readAndDrawPie()

bool ApplePictParser::readAndDrawPie | ( | ApplePictParser::DrawingMethod | method | ) |
| protected

read the current pie and draw it

Referenced by readZone().

## ◆ readAndDrawPolygon()

bool ApplePictParser::readAndDrawPolygon | ( | ApplePictParser::DrawingMethod | method | ) |
| protected

read the current polygon and draw it

Referenced by readZone().

## ◆ readAndDrawRectangle()

bool ApplePictParser::readAndDrawRectangle | ( | ApplePictParser::DrawingMethod | method | ) |
| protected

read the current rectangle and draw it

Referenced by readZone().

## ◆ readAndDrawRoundRectangle()

bool ApplePictParser::readAndDrawRoundRectangle | ( | ApplePictParser::DrawingMethod | method | ) |
| protected

read the current round rectangle and draw it

Referenced by readZone().

## ◆ readAndDrawText()

bool ApplePictParser::readAndDrawText | ( | std::string & | text | ) |
| protected

read the current text and draw it

Referenced by readZone().

## ◆ readBitmap()

bool ApplePictParser::readBitmap | ( | ApplePictParserInternal::Bitmap & | bitmap,
|  | bool | isPacked,
|  | bool | hasRgn
| ) |  |
| protected

read a bitmap

Referenced by readZone().

## ◆ readBWPattern()

bool ApplePictParser::readBWPattern | ( | MWAWGraphicStyle::Pattern & | pattern | ) |
| protected

try to read a bw pattern

Referenced by readZone().

## ◆ readColorPattern()

bool ApplePictParser::readColorPattern | ( | MWAWGraphicStyle::Pattern & | pattern | ) |
| protected

try to read a color pattern

Referenced by readZone().

## ◆ readPixmap()

bool ApplePictParser::readPixmap | ( | ApplePictParserInternal::Pixmap & | pixmap,
|  | bool | isPacked,
|  | bool | haColorTable,
|  | bool | hasRectMode,
|  | bool | hasRgn
| ) |  |
| protected

read a pixmap

Referenced by readColorPattern(), and readZone().

## ◆ readQuicktime()

bool ApplePictParser::readQuicktime | ( | MWAWEmbeddedObject & | object,
|  | MWAWBox2f & | bdBox
| ) |  |
| protected

try to read a quicktime zone

Referenced by readZone().

## ◆ readRegion()

bool ApplePictParser::readRegion | ( | ApplePictParserInternal::Region & | region | ) |
| protected

try to read a region

Referenced by readBitmap(), readPixmap(), and readZone().

## ◆ readRGBColor()

bool ApplePictParser::readRGBColor | ( | MWAWColor & | color | ) |
| protected

try to read a rgb color

Referenced by readColorPattern(), and readZone().

## ◆ readZone()

bool ApplePictParser::readZone | ( |  | ) |
| protected

try to read a zone

Referenced by createZones().

## Friends And Related Function Documentation

## ◆ ApplePictParserInternal::SubDocument

friend class ApplePictParserInternal::SubDocument
| friend

## Member Data Documentation

## ◆ m_state

std::shared_ptr<ApplePictParserInternal::State> ApplePictParser::m_state
| protected

the state

Referenced by checkHeader(), createDocument(), drawBitmap(), drawCircle(), drawLine(), drawPie(), drawPixmap(), drawPolygon(), drawRectangle(), drawRoundRectangle(), drawText(), init(), readAndDrawCircle(), readAndDrawPie(), readAndDrawPolygon(), readAndDrawRectangle(), readAndDrawRoundRectangle(), readAndDrawText(), and readZone().

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

- ApplePictParser.hxx
- ApplePictParser.cxx