the main class to read a ApplePict file More...
#include <ApplePictParser.hxx>
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 | |
~ApplePictParser () final | |
destructor | |
bool | checkHeader (MWAWHeader *header, bool strict=false) final |
checks if the document header is correct (or not) | |
void | parse (librevenge::RVNGDrawingInterface *documentInterface) final |
the main parse function | |
![]() | |
~MWAWGraphicParser () override | |
destructor | |
virtual void | parse (librevenge::RVNGDrawingInterface *documentInterface)=0 |
virtual function used to parse the input | |
![]() | |
virtual | ~MWAWParser () |
virtual destructor | |
virtual bool | checkHeader (MWAWHeader *header, bool strict=false)=0 |
virtual function used to check if the document header is correct (or not) | |
int | version () const |
returns the works version | |
MWAWParserStatePtr | getParserState () |
returns the parser state | |
MWAWHeader * | getHeader () |
returns the header | |
MWAWInputStreamPtr & | getInput () |
returns the actual input | |
MWAWListenerPtr | getMainListener () |
returns the main listener | |
MWAWGraphicListenerPtr & | getGraphicListener () |
returns the graphic listener | |
MWAWPresentationListenerPtr & | getPresentationListener () |
returns the presentation listener | |
MWAWSpreadsheetListenerPtr & | getSpreadsheetListener () |
returns the spreadsheet listener | |
MWAWTextListenerPtr & | getTextListener () |
returns the text listener | |
MWAWFontConverterPtr & | getFontConverter () |
returns the font converter | |
MWAWFontManagerPtr & | getFontManager () |
returns the font manager | |
MWAWPageSpan const & | getPageSpan () const |
returns the actual page dimension | |
MWAWPageSpan & | getPageSpan () |
returns the actual page dimension | |
double | getFormLength () const |
returns the form length | |
double | getFormWidth () const |
returns the form width | |
double | getPageLength () const |
returns the page length (form length without margin ) | |
double | getPageWidth () const |
returns the page width (form width without margin ) | |
MWAWRSRCParserPtr & | getRSRCParser () |
returns the rsrc parser | |
libmwaw::DebugFile & | ascii () |
a DebugFile used to write what we recognize when we parse the document | |
Protected Member Functions | |
bool | readZone () |
try to read a zone | |
void | init () |
inits all internal variables | |
void | createDocument (librevenge::RVNGDrawingInterface *documentInterface) |
creates the listener which will be associated to the document | |
bool | createZones () |
finds the different objects zones | |
void | drawLine (MWAWVec2i const &pt) |
draw a line from current position to position | |
bool | readAndDrawRectangle (DrawingMethod method) |
read the current rectangle and draw it | |
void | drawRectangle (DrawingMethod method) |
draw the current rectangle | |
bool | readAndDrawRoundRectangle (DrawingMethod method) |
read the current round rectangle and draw it | |
void | drawRoundRectangle (DrawingMethod method) |
draw the current round rectangle | |
bool | readAndDrawCircle (DrawingMethod method) |
read the current circle and draw it | |
void | drawCircle (DrawingMethod method) |
draw the current circle | |
bool | readAndDrawPie (DrawingMethod method) |
read the current pie and draw it | |
void | drawPie (DrawingMethod method, int startAngle, int dAngle) |
draw the current circle | |
bool | readAndDrawPolygon (DrawingMethod method) |
read the current polygon and draw it | |
void | drawPolygon (DrawingMethod method) |
draw the current polygon | |
bool | readAndDrawText (std::string &text) |
read the current text and draw it | |
void | drawText (MWAWEntry const &entry) |
draw a current text | |
void | drawBitmap (ApplePictParserInternal::Bitmap const &bitmap) |
draw a bitmap | |
void | drawPixmap (ApplePictParserInternal::Pixmap const &pixmap) |
draw a pixmap | |
bool | readRGBColor (MWAWColor &color) |
try to read a rgb color | |
bool | readBWPattern (MWAWGraphicStyle::Pattern &pattern) |
try to read a bw pattern | |
bool | readColorPattern (MWAWGraphicStyle::Pattern &pattern) |
try to read a color pattern | |
bool | readRegion (ApplePictParserInternal::Region ®ion) |
try to read a region | |
bool | readBitmap (ApplePictParserInternal::Bitmap &bitmap, bool isPacked, bool hasRgn) |
read a bitmap | |
bool | readPixmap (ApplePictParserInternal::Pixmap &pixmap, bool isPacked, bool haColorTable, bool hasRectMode, bool hasRgn) |
read a pixmap | |
bool | readQuicktime (MWAWEmbeddedObject &object, MWAWBox2f &bdBox) |
try to read a quicktime zone | |
![]() | |
MWAWGraphicParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
constructor (protected) | |
MWAWGraphicParser (MWAWParserStatePtr const &state) | |
constructor using a state | |
![]() | |
MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header) | |
constructor (protected) | |
MWAWParser (MWAWParserStatePtr const &state) | |
constructor using a state | |
void | setVersion (int vers) |
sets the document's version | |
void | setGraphicListener (MWAWGraphicListenerPtr &listener) |
sets the graphic listener | |
void | resetGraphicListener () |
resets the listener | |
void | setPresentationListener (MWAWPresentationListenerPtr &listener) |
sets the presentation listener | |
void | resetPresentationListener () |
resets the listener | |
void | setSpreadsheetListener (MWAWSpreadsheetListenerPtr &listener) |
sets the spreadsheet listener | |
void | resetSpreadsheetListener () |
resets the listener | |
void | setTextListener (MWAWTextListenerPtr &listener) |
sets the text listener | |
void | resetTextListener () |
resets the listener | |
void | setAsciiName (char const *name) |
Debugging: change the default ascii file. | |
std::string const & | asciiName () const |
return the ascii file name | |
Static Protected Member Functions | |
static std::string | getDrawingName (DrawingMethod method) |
debug function to print a drawing method | |
static std::string | getModeName (int mode) |
debug function to print a mode name | |
Protected Attributes | |
std::shared_ptr< ApplePictParserInternal::State > | m_state |
the state | |
Friends | |
class | ApplePictParserInternal::SubDocument |
the main class to read a ApplePict file
ApplePictParser::ApplePictParser | ( | MWAWInputStreamPtr const & | input, |
MWAWRSRCParserPtr const & | rsrcParser, | ||
MWAWHeader * | header | ||
) |
constructor
|
final |
destructor
|
finalvirtual |
|
protected |
creates the listener which will be associated to the document
Referenced by parse().
|
protected |
finds the different objects zones
Referenced by parse().
|
protected |
draw a bitmap
Referenced by readZone().
|
protected |
draw the current circle
Referenced by readAndDrawCircle(), and readZone().
|
protected |
draw a line from current position to position
Referenced by readZone().
|
protected |
draw the current circle
Referenced by readAndDrawPie(), and readZone().
|
protected |
draw a pixmap
Referenced by readZone().
|
protected |
draw the current polygon
Referenced by readAndDrawPolygon(), and readZone().
|
protected |
draw the current rectangle
Referenced by readAndDrawRectangle(), and readZone().
|
protected |
draw the current round rectangle
Referenced by readAndDrawRoundRectangle(), and readZone().
|
protected |
draw a current text
|
inlinestaticprotected |
debug function to print a drawing method
Referenced by readAndDrawCircle(), readAndDrawPie(), readAndDrawPolygon(), readAndDrawRectangle(), readAndDrawRoundRectangle(), and readZone().
|
staticprotected |
debug function to print a mode name
Referenced by readBitmap(), readPixmap(), and readZone().
|
protected |
inits all internal variables
Referenced by ApplePictParser().
|
finalvirtual |
the main parse function
Implements MWAWGraphicParser.
|
protected |
read the current circle and draw it
Referenced by readZone().
|
protected |
read the current pie and draw it
Referenced by readZone().
|
protected |
read the current polygon and draw it
Referenced by readZone().
|
protected |
read the current rectangle and draw it
Referenced by readZone().
|
protected |
read the current round rectangle and draw it
Referenced by readZone().
|
protected |
read the current text and draw it
Referenced by readZone().
|
protected |
read a bitmap
Referenced by readZone().
|
protected |
try to read a bw pattern
Referenced by readZone().
|
protected |
try to read a color pattern
Referenced by readZone().
|
protected |
read a pixmap
Referenced by readColorPattern(), and readZone().
|
protected |
try to read a quicktime zone
Referenced by readZone().
|
protected |
try to read a region
Referenced by readBitmap(), readPixmap(), and readZone().
|
protected |
try to read a rgb color
Referenced by readColorPattern(), and readZone().
|
protected |
try to read a zone
Referenced by createZones().
|
friend |
|
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().