Main Page Class Hierarchy Compound List File List Compound Members

# arc.h

    00001
    00002
    00003 /*
    00004 Program ARC.H
    00005 */
    00006
    00007
    00008 #ifndef ARCSEG_H
    00009 #define ARCSEG_H
    00010
    00011 #ifdef __GNUG__
    00012 #pragma interface
    00013 #endif
    00014
    00017 #include "misc.h"
    00018 #include "wxmatrix.h"
    00019 #include "polyline.h"
    00020 #include "gdserr.h"
    00021 #include "shape.h"
    00022 #include "path.h"
    00023 #include <wx/image.h>
    00024
    00025 class DrawDriver;
    00026 class Driver_out;
    00027
    00028
    00029
    00030
    00031 //:defenition
    00036 class Arcseg : public Shape
    00037 {
    00038         public:
    00039                 // Constructors and destructors
    00040                 Arcseg(int layernr = 0);
    00041                 ~Arcseg();
    00042
    00043       void OWrite(Driver_out& where);
    00044       void DoWrite(DrawDriver& dr);
    00045
    00046                 BoundingBox&                    CalcBoundingBox();
    00047                 int                                             GetDatatype();
    00048                 G_Polyline*             GetPolyline();
    00049                 void                                            SetDatatype(int);
    00050                 void                                  SetPolyline(G_Polyline*);
    00051                 TYPE                                            GetType() {return ARCSEG;};
    00052                 void                                            Transform(wxTransformMatrix* _Matrix);
    00053                 Element*                                        Duplicate();
    00054
    00055                 Arcseg&                                         operator=(Arcseg &other);
    00056                 void                    Convert(G_Polygon* _converted, double);
    00057
    00058                 bool                          Select(Point*);
    00059                 bool                          Select(BoundingBox*,wxTransformMatrix*);
    00060       wxPropertySheet*          GetPropList();
    00061                 void                                            UpdatePropList();
    00062
    00063         protected:
    00064
    00065                 G_Polyline*                             _polyline;
    00066                 int                                             _datatype;
    00067 };
    00068
    00069 //:defenition
    00073 class Box : public Shape
    00074 {
    00075         public:
    00076                 // Constructors and destructors
    00077                 Box(int layernr = 0);
    00078                 ~Box();
    00079
    00080       void OWrite(Driver_out& where);
    00081       void DoWrite(DrawDriver& dr);
    00082
    00083                 BoundingBox&                    CalcBoundingBox();
    00084                 int                                             GetBoxtype();
    00085                 void                                            SetBoxtype(int);
    00086                 void                                            Set(G_Polygon* a_rec_poly);
    00087                 void                                            Set(double x_centre,double y_centre,double ang, double w, double h);
    00088       double               GetW();
    00089       double               GetH();
    00090                 void                                            SetW(double w);
    00091                 void                                            SetH(double h);
    00092                 TYPE                                            GetType() {return BOX;};
    00093                 void                                            Transform(wxTransformMatrix* _Matrix);
    00094                 void                                            Convert(G_Polygon* _polygon, double marge);
    00095
    00096                 Element*                                        Duplicate();
    00097                 Box&                                            operator=(Box &other);
    00098
    00099                 bool                             Select(Point*);
    00100                 bool                             Select(BoundingBox*,wxTransformMatrix*);
    00101                 void                 SetRelativeMatrix(wxTransformMatrix* m);
    00102                 wxTransformMatrix*   GetRelativeMatrix();
    00103       wxPropertySheet*          GetPropList();
    00104                 void                                            UpdatePropList();
    00105
    00106         protected:
    00107
    00108       double                                    _w;
    00109       double                                    _h;
    00110       wxTransformMatrix         _relative_matrix;
    00111                 int                                             _boxtype;
    00112 };
    00113
    00114 //:defenition
    00118 class Circle: public Shape
    00119 {
    00120         public:
    00121                 // Constructors and destructors
    00122                 Circle(int layernr = 0);
    00123                 ~Circle();
    00124
    00125       void OWrite(Driver_out& where);
    00126       void DoWrite(DrawDriver& dr);
    00127
    00128                 BoundingBox&                    CalcBoundingBox();
    00129                 int                                             GetDatatype();
    00130                 void                                            SetDatatype(int);
    00131                 TYPE                                            GetType() {return CIRCLE;};
    00132                 void                                            Transform(wxTransformMatrix* _Matrix);
    00133                 Point&                                  GetMid();
    00134                 double                                  GetRadius();
    00135                 void                                            SetRadius(double radius);
    00136                 void                                            SetMid(const Point& a_point);
    00137                 void                                            SetMid(double X,double Y);
    00138                 void                                            Convert(G_Polygon* _polygon, double marge);
    00139
    00140                 Element*                                        Duplicate();
    00141                 Circle&                                         operator=(Circle &other);
    00142
    00143                 bool                          Select(Point*);
    00144                 bool                          Select(BoundingBox*,wxTransformMatrix*);
    00145       wxPropertySheet*          GetPropList();
    00146                 void                                            UpdatePropList();
    00147
    00148         protected:
    00149
    00150                 Point                _mid;
    00151                 double              _radius;
    00152                 int                                             _datatype;
    00153 };
    00154
    00155 //:defenition
    00159 class Image: public Shape
    00160 {
    00161         public:
    00162                 // Constructors and destructors
    00163                 Image(int layernr,const wxString& path);
    00164                 Image();
    00165                 ~Image();
    00166
    00167       void OWrite(Driver_out& where);
    00168       void DoWrite(DrawDriver& dr);
    00169
    00170                 BoundingBox&                    CalcBoundingBox();
    00171                 TYPE                                            GetType() {return IMAGE;};
    00172                 void                                            Transform(wxTransformMatrix* _Matrix);
    00173                 Point                                   GetPosition();
    00174                 void                                            SetPosition(Point *a_point);
    00175                 void                                            SetPosition(double X,double Y);
    00176
    00177                 Element*                                        Duplicate();
    00178                 Image&                                  operator=(Image &other);
    00179
    00180                 bool                            Select(Point*);
    00181                 bool                            Select(BoundingBox*,wxTransformMatrix*);
    00182       wxPropertySheet*          GetPropList();
    00183                 void                                            UpdatePropList();
    00184                 void                                            Convert(G_Polygon* _polygon, double aber);
    00185       wxImage              GetImage(){return m_image;}
    00186
    00187       double                                    GetH();
    00188       void                                              SetH(double newheight);
    00189                 void                                            SetRotation(double rotation);
    00190                 double                                  GetRotation();
    00191       double                                    GetW();
    00192       void                 SetW(double width);
    00193       void                 SetPictureType(const wxString& type);
    00194       wxString             GetPictureType();
    00195       void                 SetPath(const wxString& path);
    00196       wxString             GetPath();
    00197                 void                 SetRelativeMatrix(wxTransformMatrix* m);
    00198                 wxTransformMatrix*   GetRelativeMatrix();
    00199
    00200
    00201         protected:
    00202       double                                    m_w;
    00203       double                                    m_h;
    00204       wxImage              m_image;
    00205       wxString                                  m_path;
    00206       wxTransformMatrix         _relative_matrix;
    00207       wxString                                  m_type;
    00208 };
    00209
    00210 //:defenition
    00214 class SLine : public Shape
    00215 {
    00216         public:
    00217                 // Constructors and destructors
    00218                 SLine(int layernr = 0);
    00219                 ~SLine();
    00220
    00221       void OWrite(Driver_out& where);
    00222       void DoWrite(DrawDriver& dr);
    00223
    00224                 BoundingBox&                    CalcBoundingBox();
    00225                 void                                            Set(double x1,double y1,double x2, double y2);
    00226       double               GetX1(){return m_x1;};
    00227       double               GetY1(){return m_y1;};
    00228       double               GetX2(){return m_x2;};
    00229       double               GetY2(){return m_y2;};
    00230       void                 SetX1(double v){m_x1=v;};
    00231       void                 SetY1(double v){m_y1=v;};
    00232       void                 SetX2(double v){m_x2=v;};
    00233       void                 SetY2(double v){m_y2=v;};
    00234                 TYPE                                            GetType() {return SLINE;};
    00235                 void                                            Transform(wxTransformMatrix* _Matrix);
    00236                 void                                            Convert(G_Polygon* _polygon, double marge);
    00237
    00238                 Element*                                        Duplicate();
    00239                 SLine&                                  operator=(SLine &other);
    00240
    00241                 bool                             Select(Point*);
    00242                 bool                             Select(BoundingBox*,wxTransformMatrix*);
    00243       wxPropertySheet*          GetPropList();
    00244                 void                                            UpdatePropList();
    00245
    00246                 void                                  SetPathtype(PATHTYPE);
    00247                 PATHTYPE                         GetPathtype();
    00248
    00249         protected:
    00250
    00251                 PATHTYPE                                        m_pathtype;
    00252       Structure*           m_arrow;
    00253       double                                    m_x1;
    00254       double                                    m_y1;
    00255       double                                    m_x2;
    00256       double                                    m_y2;
    00257
    00258 };
    00259 #endif
    00260

arc.h Source File -- Thu Nov 28 21:24:55 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . -- Main Page