21 #include <wx/wfstream.h>
23 #include "a2dprivate.h"
65 void SetReadAsCameleon(
bool asCameleons ) { m_asCameleons = asCameleons; }
67 bool GetReadAsCameleon() {
return m_asCameleons; }
82 bool ReadItem(
const wxString& type );
110 bool ReadGdsHeader();
112 bool ReadLibrarySettings();
114 bool ReadStrans(
Strans& _Strans );
140 wxString m_error_mes;
154 double m_userunits_out;
158 wxUint16 m_lastElementLayer;
185 bool CanSave(
const wxObject* obj = NULL );
193 void SetReadAsCameleon(
bool asCameleons ) { m_asCameleons = asCameleons; }
195 bool GetReadAsCameleon() {
return m_asCameleons; }
204 void SetFormat(
const wxString& format ) { m_format = format; }
222 str.Printf( m_format.c_str(), d );
229 #if wxUSE_UNICODE && wxWCHAR_T_IS_REAL_TYPE
231 #endif // wxUSE_UNICODE
243 void WriteFlags(
int i );
249 void WritePoint(
double xi,
double yi );
253 void WriteVpath(
const a2dAffineMatrix& lworld,
const a2dVpath* path,
int layer,
int datatype,
int pathtype,
double width );
257 void WriteVertexArrayPolyline(
const a2dAffineMatrix& lworld,
a2dVertexArray* points,
int layer,
int datatype,
int pathtype,
double width,
bool spline =
false,
bool close =
true );
259 void WriteVertexListPolyline(
const a2dAffineMatrix& lworld,
a2dVertexList* points,
int layer,
int datatype,
int pathtype,
double width,
bool spline =
false,
bool close =
true );
261 void WriteVertexArrayPolygon(
const a2dAffineMatrix& lworld,
a2dVertexArray* points,
int layer,
int datatype,
double width,
bool spline =
false,
bool close =
true );
263 void WriteVertexListPolygon(
const a2dAffineMatrix& lworld,
a2dVertexList* points,
int layer,
int datatype,
double width,
bool spline =
false,
bool close =
true );
297 double m_userunits_out;
301 unsigned int m_points_written;
303 wxUint16 m_lastElementLayer;
308 bool m_fromViewAsTop;
315 #endif //wxART2D_USE_KEYIO
a2dCircle at x,y, and with radius
wxPoint2DDouble a2dPoint2D
this to define if coordinate numbers are integer or doubles
a2dCanvasObjectReference is a reference to any a2dCanvasObject derived class.
virtual void InitializeLoad()
Inits the handler for reading.
wxString m_keyword
keyword for record in KEY data
a2dTextGDS text based on wxDC text drawing.
virtual bool Load(a2dDocumentInputStream &stream, wxObject *obj)=0
override to read the stream and store (part of) the contents in to a specific a2dDocument or othere o...
virtual void InitializeSave()
Inits the handler for writing.
virtual void ResetSave()
Reset the object after saving.
polygon defined with list of points.
wxOutputStream a2dDocumentOutputStream
output stream based wxStreams
Input driver for KEY format files.
using a file stream for input, stream the file into a a2dDocument or other object ...
list of a2dNamedProperty objects
bool GetFromViewAsTop()
/see SetFromViewAsTop()
vertex array of line and arc segments.
object to show several appearance views on what it contains
virtual bool CanLoad(a2dDocumentInputStream &stream, const wxObject *obj=NULL, wxClassInfo *docClassInfo=NULL)=0
Should return true if the handler can read from the stream.
a2dCanvasObject is the base class for Canvas Objects.
void SetFromViewAsTop(bool fromViewAsTop)
if set, the current view its ShowObject will be saved top down.
a2dCanvasObjectArrayReference is an array of a reference to any a2dCanvasObject derived class...
vertex list of line and arc segments.
a2dCanvasDocument * m_doc
the document to store/load the data found into
wxUint32 m_linenumber
last read line in DATA
a2dText is an abstract base class.
void SetSaveTextAsVpath(bool textAsPath)
if set text will be converted to a vectorpath, and as polygons and polylines.
polyline defined with list of points.
a2dCameleonInst to show one appearance of an a2dCameleon.
layer settings for a a2dCanvasDocument Holds layers settings classes
void SetFormat(const wxString &format)
set the format for double to be this
Normal straight line segment in a2dVertexList and a2dVertexArray.
TWO_G_BYTE_UNSIGNED_INTEGER m_recordsize
size of the last read record
virtual bool Save(a2dDocumentOutputStream &stream, const wxObject *obj)=0
Override to write to the stream and store (part of) of the document contents in the stream...
std::vector< int > m_mapping
mapping of GDSII layers to internal layers
using a file stream for output, stream a a2dDocument or other wxObject into a stream.
A 2x3 affine matrix class for 2D transformations.
wxInputStream a2dDocumentInputStream
input stream based wxStreams
virtual void WriteDouble(double d)
write a double number.
polygon defined with list of points for outer contour plus a list of hole polygons ...
virtual bool CanSave(const wxObject *obj=NULL)=0
Should return true if the handler can write this document to a stream.
wxString m_value
value for record in KEY data
a2dCanvasDocument * m_doc
the document to store/load the data found into
Output driver for KEY files.
bool m_textAsPath
if true, vonvert text to a2dVpath
Each a2dCanvasView needs to have a a2dCanvasDocument set in order to render data. ...
class to hold GDS-II transformation info, only used within the GDSII reader
int m_recordtype
type of the record in KEY data
bool m_back
last read record is stored
GdsII format input and output.
virtual bool LinkReferences(bool ignoreNonResolved=false)
link references to their destination
bool GetSaveTextAsVpath()
/see SetSaveTextAsVpath()
virtual void WriteString(const wxString &string)
write a string
virtual void ResetLoad()
Reset the handler after loading.
std::vector< int > m_mapping
mapping of GDSII layers to internal layers