#include <parssvg.h>


Public Member Functions | |
| virtual bool | CanLoad (a2dDocumentInputStream &stream, const wxObject *obj=NULL, wxClassInfo *docClassInfo=NULL) |
| Should return true if the handler can read from the stream. | |
| virtual bool | Load (a2dDocumentInputStream &stream, wxObject *doc) |
| override to read the stream and store (part of) the contents in to a specific a2dDocument or othere object. | |
Protected Member Functions | |
| bool | LoadSvg (a2dCanvasDocument *doc) |
| bool | LoadSvgGroup (a2dCanvasObject *parent) |
| bool | LoadSvgAnchor (a2dCanvasObject *parent) |
| bool | LoadSvgGroupElement (a2dCanvasObject *parent) |
| bool | LoadSvgRect (a2dCanvasObject *parent) |
| bool | LoadSvgCircle (a2dCanvasObject *parent) |
| bool | LoadSvgEllipse (a2dCanvasObject *parent) |
| bool | LoadSvgText (a2dCanvasObject *parent) |
| bool | ParsePoints (a2dVertexList *points) |
| bool | LoadSvgPolygon (a2dCanvasObject *parent) |
| bool | LoadSvgPolyline (a2dCanvasObject *parent) |
| bool | LoadSvgLine (a2dCanvasObject *parent) |
| bool | ParsePathPoints (a2dVpath *points) |
| bool | LoadSvgPath (a2dCanvasObject *parent) |
| bool | LoadSvgImage (a2dCanvasObject *parent) |
| bool | ParseSvgTransForm (a2dCanvasObject *parent) |
| bool | ParseSvgStyle (a2dCanvasObject *parent) |
| bool | ParseSvgLink (a2dCanvasObject *parent) |
Protected Attributes | |
| a2dCanvasDocument * | m_doc |
| the document to store/load the data found into | |
| a2dCanvasObjectPtr | m_currentobject |
| a2dFill | m_fill |
| currentfill style | |
| a2dStroke | m_stroke |
| currentstroke style | |
Definition at line 37 of file parssvg.h.
| bool a2dIOHandlerSVGIn::CanLoad | ( | a2dDocumentInputStream & | stream, | |
| const wxObject * | obj = NULL, |
|||
| wxClassInfo * | docClassInfo = NULL | |||
| ) | [virtual] |
Should return true if the handler can read from the stream.
A typical implementation is to read the first part of the file, to see if the contents is right for this handler. Then it resets the file pointer to the beginning again.
In general a handler is written with a certain type of document in mind, since that is where the information will be stored. The document view framework, uses document templates to get to input handlers. The last 2 parameters can be checked if set. Use SetDocumentClassInfo() to set the right classinfo, in case of a derived document object, which still can be read with the this handler. Like:
a2dIOHandlerKeyIn* keyhin = new a2dIOHandlerKeyIn(); keyhin->SetDocumentClassInfo( &MyDocument::ms_classInfo );
| stream | the open stream which its header can be tested | |
| obj | to check and load the data into, needs to be casted to the right one internal. | |
| docClassInfo | to check if the inout handler is indeed able to read document of m_docClassInfo. |
Implements a2dIOHandlerStrIn.
Definition at line 58 of file parssvg.cpp.
| bool a2dIOHandlerSVGIn::Load | ( | a2dDocumentInputStream & | stream, | |
| wxObject * | obj | |||
| ) | [virtual] |
override to read the stream and store (part of) the contents in to a specific a2dDocument or othere object.
Understand that a a2dDocument itself is useless for storing data, so it needs to be casted internal.
| stream | the open stream to load from | |
| obj | to load the data into, needs to be casted to the right one internal. |
Implements a2dIOHandlerStrIn.
Definition at line 86 of file parssvg.cpp.
| bool a2dIOHandlerSVGIn::ParsePathPoints | ( | a2dVpath * | points | ) | [protected] |
| bool a2dIOHandlerSVGIn::ParseSvgStyle | ( | a2dCanvasObject * | parent | ) | [protected] |