a2dIOHandlerSVGOut Class Reference
[File IOSVG File IO]

output handler for the SVG format More...

#include <parssvg.h>

Inheritance diagram for a2dIOHandlerSVGOut:

Inheritance graph
[legend]
Collaboration diagram for a2dIOHandlerSVGOut:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void SetShowObject (a2dCanvasObject *showObject)
 document will be saved as seen from this object, if NULL, the root of the document will be used.
a2dCanvasObjectGetShowObject () const
 return pointer of the currently set object to save.
void SetIterC (a2dIterC &ic)
bool CanSave (const wxObject *obj=NULL)
 Should return true if the handler can write this document to a stream.
virtual bool Save (a2dDocumentOutputStream &stream, const wxObject *doc)
 Override to write to the stream and store (part of) of the document contents in the stream.

Protected Member Functions

void Save (const a2dCanvasObject *object, int layer)
void SetSVGStyle (const a2dFill &fill, const a2dStroke &stroke, const a2dCanvasObject *object, int layer)
void SaveGradient (const a2dFill &fill, const a2dCanvasObject *object)
void CreateSVGSpline (const a2dVertexList *vertexList, bool asPolygon=false, const wxString &style=_T(""))
 Generates a quadratic spline path in SVG from a set of points representing the control polygon. This correctly renders the spline in the same way as the drawers for both polylines and polygons.
void CreateSVGSpline (const a2dVertexArray *vertexArray, bool asPolygon=false, const wxString &style=_T(""))
void DoSave (const a2dCanvasObject *object, int layer)
 Generates SVG XML code for different types of canvas objects.
void DoSaveProperty (const a2dCanvasObject *object, const a2dNamedProperty *property, int layer)
wxString UniqueName (wxString baseName)

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
a2dIterCm_ic
a2dCanvasObjectm_showObject
 save the document from this object down.
map< wxString, int > m_nameMap


Detailed Description

output handler for the SVG format

Definition at line 101 of file parssvg.h.


Member Function Documentation

a2dCanvasObject* a2dIOHandlerSVGOut::GetShowObject (  )  const [inline]

return pointer of the currently set object to save.

Returns:
: pointer to the current object that is shown.

Definition at line 116 of file parssvg.h.

bool a2dIOHandlerSVGOut::CanSave ( const wxObject *  obj = NULL  )  [virtual]

Should return true if the handler can write this document to a stream.

Mostly implemented by simply returning true if the handler can indeed do this job. Understand that a a2dDocument itself is useless for storing data, so it needs to be casted internal to a specific a2dDocument.

Parameters:
obj pointer to object to save, normally a document.

Implements a2dIOHandlerStrOut.

Definition at line 1527 of file parssvg.cpp.

bool a2dIOHandlerSVGOut::Save ( a2dDocumentOutputStream stream,
const wxObject *  obj 
) [virtual]

Override to write to the stream and store (part of) of the document contents in the stream.

Understand that a a2dDocument itself is useless for storing data, so it needs to be casted internal to a specific a2dDocument.

Parameters:
stream the open stream to which the object needs to be saved
obj object to save into stream, needs to be casted to the right one internal.

Implements a2dIOHandlerStrOut.

Definition at line 1534 of file parssvg.cpp.

void a2dIOHandlerSVGOut::Save ( const a2dCanvasObject object,
int  layer 
) [protected]

todo this save of SVG should itself make a record of available layers, maybe use an internal view to do so.

Definition at line 1639 of file parssvg.cpp.

void a2dIOHandlerSVGOut::DoSave ( const a2dCanvasObject object,
int  layer 
) [protected]

Generates SVG XML code for different types of canvas objects.

now same as circle arc...

now same as circle arc...

Todo:
Multiline text (tspan)

Definition at line 2226 of file parssvg.cpp.


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