pPlotterLayer.h

Go to the documentation of this file.
00001 
00002 #ifndef __pPlotterLayer_h__
00003 #define __pPlotterLayer_h__
00004 // ----------------------------------------------------------------------------
00005 // WX headers inclusion.
00006 // For compilers that support precompilation, includes <wx/wx.h>.
00007 // ----------------------------------------------------------------------------
00008 
00009 #include <wx/wxprec.h>
00010 #ifdef __BORLANDC__
00011 #pragma hdrstop
00012 #endif
00013 #ifndef WX_PRECOMP
00014 #include <wx/wx.h>
00015 #endif
00016 
00017 
00018 //----------------------------------------------------------------------------
00019 // Includes
00020 //----------------------------------------------------------------------------
00021 #include "mathplot.h"
00022 #include "pFunctionPoint.h"
00023 #include <vector>
00024 
00025 #define MAX_POINTS 50
00026 #define MOVE 5
00027 
00028 
00029 //using namespace std;
00030 //----------------------------------------------------------------------------
00031 // Class definition
00032 //----------------------------------------------------------------------------
00033 class creaMaracasVisu_EXPORT pPlotterLayer: public mpLayer 
00034 {
00035 
00036 public:
00040         pPlotterLayer(wxString name = wxEmptyString, int flags = mpALIGN_NE);
00041         /*
00042          it define the first point of the polygon for be drawing
00043          returs true if the first and second point of the polygon are setted
00044         */
00045         bool initializePolygon(wxPoint* points,double x1, double y1,double x2, double y2);
00046         /*
00047         Draw the line from (x1,y1) to (x2,y2) only passing by the 
00048         positive points in the line
00049         */
00050 void draw(wxDC & dc,mpWindow & w,double x1,double y1,double x2,double y2, int orgy);
00051         
00056         void drawSplineCurve(wxDC & dc,mpWindow & w, int orgy);
00057         
00062         void drawLineToMousePoint(wxDC & dc,mpWindow & w, int orgy);
00066         void drawFunction(wxDC & dc,mpWindow & w, int orgy);
00070         void drawPoints(wxDC & dc,mpWindow & w, int orgy );
00071         
00076         virtual int getXTraslation()
00077         {
00078                 return -1;
00079         }
00085         virtual int getmType()
00086         {
00087                 return -1;
00088         }
00092         virtual void getMaxShowed(int & maxX, int &maxY)
00093         {
00094         }
00098         virtual void getMinShowed(int & minX, int &minY)
00099         {
00100         }
00101         
00106         virtual int getOffsetPixelsXv(){return -1;}     
00107         
00108         
00113         virtual int getOffsetPixelsYv(){ return -1;}
00114 
00115         
00116         /*
00117          returns the xSpline to plotter
00118         */
00119         virtual std::vector<double> getXSpline()
00120         { 
00121                 std::vector<double> v;
00122                 return v;
00123         }
00124         /*
00125          returns the ySpline to plotter
00126         */
00127         virtual std::vector<double> getYSpline()
00128         { 
00129                 std::vector<double> v;
00130                 return v;
00131         }
00132 
00138         virtual int vGetType()
00139         { return -1;}
00140 
00141 
00146         virtual void getOffsets(int &offsetX,int &offSetY )
00147         {}
00148 
00149         /*
00150         * Get the factor zoom
00151         */
00152         virtual void getFactorZoom(float & fz){}
00156         virtual void getIfActual(bool &actual){}
00157         
00158         
00162         virtual void getMax(int & maxX, int &maxY){}
00163 
00167         virtual void  getScreens(int & scrX, int & scrY){}
00168 
00172         virtual void setScreens(int scrX,int scrY){}
00173 
00177         virtual void getScales(double & scaleX,double & scaleY){}
00178 
00182         virtual void Rewind(){}
00183 
00189         virtual bool GetNextXY(double & x, double & y){return false;}
00190 
00195         virtual void GetPoints(wxList &points){}
00196 
00201         virtual void Plot(wxDC & dc, mpWindow & w);
00206         virtual void ifShowPoints(bool & show){}
00207 
00212         virtual void getDrawing(bool &draw){}
00213         /*
00214         * Gets the point of the mouse where the user is
00215         */
00216         virtual void getMousePoint(int &x,int &y){}
00220         virtual void getDirection(bool &dir){}
00224         virtual void getSize(int &size){};
00225 
00226 protected:
00227         int m_flags; 
00228         /*
00229         * Points of the function thats is drawing
00230         */
00231         wxList points;
00232         /*
00233         * the scale in x, with wich it must draw
00234         */
00235         double scaleX;
00236         /*
00237         * the scale in y, with wich it must draw
00238         */
00239         double scaleY;
00240 
00244         int offsetX;
00245         
00249         int offsetY;
00250         
00251 
00252         DECLARE_CLASS (pPlotterLayer)
00253 };
00254 
00255 #endif
00256 
00257 

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1