a2dIOHandlerSVGIn Class Reference
[File IOSVG File IO]

input handler for the SVG format More...

#include <parssvg.h>

Inheritance diagram for a2dIOHandlerSVGIn:

Inheritance graph
[legend]
Collaboration diagram for a2dIOHandlerSVGIn:

Collaboration graph
[legend]

List of all members.

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

a2dCanvasDocumentm_doc
 the document to store/load the data found into
a2dCanvasObjectPtr m_currentobject
a2dFill m_fill
 currentfill style
a2dStroke m_stroke
 currentstroke style


Detailed Description

input handler for the SVG format

Definition at line 37 of file parssvg.h.


Member Function Documentation

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 );

Parameters:
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.

Parameters:
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]

\!todo shoud be EllipticalArcSegment?

Definition at line 1096 of file parssvg.cpp.

bool a2dIOHandlerSVGIn::ParseSvgStyle ( a2dCanvasObject parent  )  [protected]

Todo:
font-size

Todo:
font-family

Todo:
stroke-miterlimit

Definition at line 536 of file parssvg.cpp.


The documentation for this class was generated from the following files:
a2dIOHandlerSVGIn Class Reference -- Tue Aug 31 18:29:16 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation