X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FpPlotter%2Fmathplot.h;h=0856926539196dbf1f63d73607b18d976191d6d8;hb=65c158dc171f8d3114ee3544b2a94a1f41880df0;hp=0edba5f7fb627603f0c43eb8b7a76a679fb819d9;hpb=91d953bb56306aecaa7dafa617eed0e8d32a0391;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mathplot.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mathplot.h index 0edba5f..0856926 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mathplot.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mathplot.h @@ -50,6 +50,7 @@ http://sourceforge.net/projects/wxmathplot #endif */ +#include "marTypes.h" #include "wx/defs.h" #include @@ -94,7 +95,7 @@ Examples for mpLayer implementations are function graphs, or scale rulers. For convenience mpLayer defines a name, a font (wxFont), and a pen (wxPen) as class members. These may or may not be used by implementations. */ -class mpLayer : public wxObject +class creaMaracasVisu_EXPORT mpLayer : public wxObject { public: mpLayer(); @@ -193,6 +194,14 @@ public: */ void SetPen(wxPen& pen) { m_pen = pen; } + /** + ** Get the translation of the Y coordinate acoording to the new orientation of the axis du to the problem + ** identified in MACOS with the funtion 'SetAxisOrientation' + **/ + int GetYTranslated(double sizey, double y){ + return -y+sizey; + } + protected: wxFont m_font; //!< Layer's font wxPen m_pen; //!< Layer's pen @@ -384,7 +393,7 @@ public: /** Layer plot handler. This implementation will plot the ruler adjusted to the visible area. */ - virtual void Plot(wxDC & dc, mpWindow & w); + virtual void Plot(wxDC & dc, mpWindow & w, int orgy); /** Check whether this layer has a bounding box. This implementation returns \a FALSE thus making the ruler invisible @@ -421,7 +430,7 @@ The canvas window provides a context menu with actions for navigating the view. The context menu can be retrieved with mpWindow::GetPopupMenu, e.g. for extending it externally. */ -class mpWindow : public wxScrolledWindow +class creaMaracasVisu_EXPORT mpWindow : public wxScrolledWindow { public: mpWindow() {} @@ -783,6 +792,13 @@ public: /** Refresh display */ void UpdateAll(); + /** + ** Get the translation of the Y coordinate + **/ + int GetYTranslated(wxSize size, double y){ + return size.GetHeight()-y; + } + protected: void Refresh(bool eraseBackground = true, const wxRect* rect = NULL);