Skip to content
Snippets Groups Projects
Commit c623316c authored by slevy's avatar slevy
Browse files

Add zoomview(). Store glOrtho plot view ranges in instance variables.

parent f87955db
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,8 @@ class Fl_Plot : public Fl_Gl_Window {
char *xtitle() const { return xtitle_; }
char *ytitle() const { return ytitle_; }
float zoomview( float zoomin, int xev = 0, int yev = 0 );
int inpick() const { return inpick_; } // draw()ers: am I in GL_SELECT mode?
void picksize( float width, float height );
void pickbuffer( int words, GLuint *buf );
......@@ -74,8 +76,10 @@ class Fl_Plot : public Fl_Gl_Window {
protected:
float x0_, x1_, y0_, y1_;
float initx0_, inity0_, initx1_, inity1_;
char *xtitle_, *ytitle_;
float orthox0_, orthox1_, orthoy0_, orthoy1_;
void (*pickcb_)( Fl_Gl_Window *, int hits, int nents, GLuint *buf, void *arg );
int inpick_;
float pickx_, picky_, pickwidth_, pickheight_;
......@@ -122,6 +126,12 @@ class Fl_Plot : public Fl_Gl_Window {
drawers_ = NULL;
inpick_ = 0;
pickwidth_ = 2, pickheight_ = 2;
orthox0_ = -.15;
orthox1_ = 1.05;
orthoy0_ = -.15;
orthoy1_ = 1.05;
picknents_ = sizeof(tpickbuf) / sizeof(tpickbuf[0]);
pickbuf_ = tpickbuf;
pickarg_ = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment