Isis 3.0 Programmer Reference
Back | Home
ZoomTool.cpp
Go to the documentation of this file.
1 
21 #include <QAction>
22 #include <QApplication>
23 #include <QHBoxLayout>
24 #include <QLabel>
25 #include <QLineEdit>
26 #include <QMenu>
27 #include <QMenuBar>
28 #include <QMessageBox>
29 #include <QPushButton>
30 #include <QStackedWidget>
31 #include <QToolButton>
32 #include <QValidator>
33 
34 #include "IException.h"
35 #include "IString.h"
36 #include "MainWindow.h"
37 #include "MdiCubeViewport.h"
38 #include "RubberBandTool.h"
39 #include "ToolPad.h"
40 #include "Workspace.h"
41 #include "ZoomTool.h"
42 
43 namespace Isis {
50  ZoomTool::ZoomTool(QWidget *parent) : Tool(parent) {
51  p_zoomIn2X = new QAction(parent);
52  p_zoomIn2X->setShortcut(Qt::Key_Plus);
53  p_zoomIn2X->setText("Zoom In");
54  p_zoomIn2X->setIcon(QPixmap(toolIconDir() + "/viewmag+.png"));
55  connect(p_zoomIn2X, SIGNAL(triggered()), this, SLOT(zoomIn2X()));
56 
57  p_zoomIn4X = new QAction(parent);
58  p_zoomIn4X->setText("Zoom In 4X");
59  p_zoomIn4X->setShortcut(Qt::CTRL + Qt::Key_Plus);
60  connect(p_zoomIn4X, SIGNAL(triggered()), this, SLOT(zoomIn4X()));
61 
62  p_zoomIn8X = new QAction(parent);
63  p_zoomIn8X->setShortcut(Qt::ALT + Qt::Key_Plus);
64  p_zoomIn8X->setText("Zoom In 8X");
65  connect(p_zoomIn8X, SIGNAL(triggered()), this, SLOT(zoomIn8X()));
66 
67  p_zoomOut2X = new QAction(parent);
68  p_zoomOut2X->setShortcut(Qt::Key_Minus);
69  p_zoomOut2X->setText("Zoom Out");
70  p_zoomOut2X->setIcon(QPixmap(toolIconDir() + "/viewmag-.png"));
71  connect(p_zoomOut2X, SIGNAL(triggered()), this, SLOT(zoomOut2X()));
72 
73  p_zoomOut4X = new QAction(parent);
74  p_zoomOut4X->setShortcut(Qt::CTRL + Qt::Key_Minus);
75  p_zoomOut4X->setText("Zoom Out 4X");
76  connect(p_zoomOut4X, SIGNAL(triggered()), this, SLOT(zoomOut4X()));
77 
78  p_zoomOut8X = new QAction(parent);
79  p_zoomOut8X->setShortcut(Qt::ALT + Qt::Key_Minus);
80  p_zoomOut8X->setText("Zoom Out 8X");
81  connect(p_zoomOut8X, SIGNAL(triggered()), this, SLOT(zoomOut8X()));
82 
83  p_zoomActual = new QAction(parent);
84  p_zoomActual->setShortcut(Qt::Key_Slash);
85  p_zoomActual->setText("&Actual Pixels");
86  p_zoomActual->setIcon(QPixmap(toolIconDir() + "/viewmag1.png"));
87  connect(p_zoomActual, SIGNAL(triggered()), this, SLOT(zoomActual()));
88 
89  p_zoomFit = new QAction(parent);
90  p_zoomFit->setShortcut(Qt::Key_Asterisk);
91  p_zoomFit->setText("&Fit in Window");
92  p_zoomFit->setIcon(QPixmap(toolIconDir() + "/viewmagfit.png"));
93  connect(p_zoomFit, SIGNAL(triggered()), this, SLOT(zoomFit()));
94 
95  }
96 
107  QAction *action = new QAction(toolpad);
108  action->setIcon(QPixmap(toolIconDir() + "/viewmag.png"));
109  action->setToolTip("Zoom (Z)");
110  action->setShortcut(Qt::Key_Z);
111  QString text =
112  "<b>Function:</b> Zoom in or out of the current cube. \
113  <p><b>Shortcut:</b> Z</p> ";
114  action->setWhatsThis(text);
115  return action;
116  }
117 
118 
127  void ZoomTool::addTo(QMenu *menu) {
128  menu->addAction(p_zoomFit);
129  menu->addAction(p_zoomActual);
130  menu->addAction(p_zoomIn2X);
131  menu->addAction(p_zoomOut2X);
132  }
133 
134 
153  QWidget *ZoomTool::createToolBarWidget(QStackedWidget *parent) {
154  QWidget *hbox = new QWidget(parent);
155 
156  QToolButton *zoomInButton = new QToolButton(hbox);
157  zoomInButton->setIcon(QPixmap(toolIconDir() + "/viewmag+.png"));
158  zoomInButton->setToolTip("Zoom In");
159  QString text =
160  "<b>Function:</b> Zoom in 2X at the center of the active viewport \
161  <p><b>Shortcut:</b> +</p> \
162  <p><b>Mouse:</b> LeftButton zooms in 2X under pointer</p> \
163  <p><b>Modifiers:</b> Shortcuts and mouse clicks can be augmented \
164  using the Ctrl or Alt key for 4X and 8X zooms, respectively</p> \
165  <p><b>Hint:</b> Left click and drag for a local zoom which scales data \
166  in the red marquee to the viewport</p>";
167  zoomInButton->setWhatsThis(text);
168  connect(zoomInButton, SIGNAL(clicked()), this, SLOT(zoomIn2X()));
169  zoomInButton->setAutoRaise(true);
170  zoomInButton->setIconSize(QSize(22, 22));
171 
172  QToolButton *zoomOutButton = new QToolButton(hbox);
173  zoomOutButton->setIcon(QPixmap(toolIconDir() + "/viewmag-.png"));
174  zoomOutButton->setToolTip("Zoom Out");
175  text =
176  "<b>Function:</b> Zoom out 2X at the center of the active viewport \
177  <p><b>Shortcut:</b> +</p> \
178  <p><b>Mouse:</b> RightButton zooms out 2X under pointer</p> \
179  <p><b>Modifiers:</b> Shortcuts and mouse clicks can be augmented \
180  using the Ctrl or Alt key for 4X and 8X zooms, respectively</p> \
181  <p><b>Hint:</b> Left click and drag for a local zoom which scales data \
182  in the red marquee to the viewport</p>";
183  zoomOutButton->setWhatsThis(text);
184  connect(zoomOutButton, SIGNAL(clicked()), this, SLOT(zoomOut2X()));
185  zoomOutButton->setAutoRaise(true);
186  zoomOutButton->setIconSize(QSize(22, 22));
187 
188  QToolButton *zoomActButton = new QToolButton(hbox);
189  zoomActButton->setIcon(QPixmap(toolIconDir() + "/viewmag1.png"));
190  zoomActButton->setToolTip("Zoom 1:1");
191  text =
192  "<b>Function:</b> Zoom the active viewport to 1:1 such that one \
193  viewport pixel represents one cube pixel. That is, 100% scale. \
194  <p><b>Shortcut:</b> /</p> \
195  <p><b>Mouse:</b> Ctrl+MiddleButton zooms 1:1 under pointer</p> \
196  <p><b>Hint:</b> MiddleButton (without Ctrl) retains current \
197  scale but moves the pixel under the pointer to the center of the \
198  viewport</p>";
199  zoomActButton->setWhatsThis(text);
200  connect(zoomActButton, SIGNAL(clicked()), this, SLOT(zoomActual()));
201  zoomActButton->setAutoRaise(true);
202  zoomActButton->setIconSize(QSize(22, 22));
203 
204  // Create menu on the zoomFit button to select fitting the cube for
205  // width or height.
206  QMenu *zoomFitMenu = new QMenu();
207  QAction *fitWidth = new QAction(this);
208  fitWidth->setText("Fit Width");
209  connect(fitWidth, SIGNAL(triggered(bool)), this, SLOT(zoomFitWidth()));
210  zoomFitMenu->addAction(fitWidth);
211 
212  QAction *fitHeight = new QAction(this);
213  fitHeight->setText("Fit Height");
214  connect(fitHeight, SIGNAL(triggered(bool)), this, SLOT(zoomFitHeight()));
215  zoomFitMenu->addAction(fitHeight);
216 
217  QToolButton *zoomFitButton = new QToolButton(hbox);
218  zoomFitButton->setIcon(QPixmap(toolIconDir() + "/viewmagfit.png"));
219  zoomFitButton->setMenu(zoomFitMenu);
220  zoomFitButton->setPopupMode(QToolButton::MenuButtonPopup);
221  zoomFitButton->setToolTip("Fit in viewport");
222  text =
223  "<b>Function:</b> Fit the entire cube inside the active viewport. For \
224  extremely large cubes, this may not be possible. \
225  <p><b>Shortcut:</b> *</p> \
226  <p><b>Hint:</b> Many shortcuts for the zoom tool and other tools \
227  are easily available on the numeric keypad </p>";
228  zoomFitButton->setWhatsThis(text);
229  connect(zoomFitButton, SIGNAL(clicked()), this, SLOT(zoomFit()));
230  zoomFitButton->setAutoRaise(true);
231  zoomFitButton->setIconSize(QSize(22, 22));
232 
233  p_zoomLineEdit = new QLineEdit(hbox);
234  p_zoomLineEdit->setText("");
235  p_zoomLineEdit->setMaxLength(8);
236  p_zoomLineEdit->setMaximumWidth(80);
237 
238  QDoubleValidator *dval = new QDoubleValidator(hbox);
239  p_zoomLineEdit->setValidator(dval);
240 
241  QSizePolicy policy = p_zoomLineEdit->sizePolicy();
242  policy.setHorizontalPolicy(QSizePolicy::Fixed);
243  p_zoomLineEdit->setSizePolicy(policy);
244 
245  p_zoomLineEdit->setToolTip("Scale");
246  text =
247  "<b>Function:</b> Shows the scale of the active viewport. Additionally, \
248  you can manually enter the scale.";
249  p_zoomLineEdit->setWhatsThis(text);
250  connect(p_zoomLineEdit, SIGNAL(returnPressed()), this, SLOT(zoomManual()));
251 
252  QHBoxLayout *layout = new QHBoxLayout(hbox);
253  layout->setMargin(0);
254  layout->addWidget(zoomInButton);
255  layout->addWidget(zoomOutButton);
256  layout->addWidget(zoomActButton);
257  layout->addWidget(zoomFitButton);
258  layout->addWidget(p_zoomLineEdit);
259  layout->addStretch(1);
260  hbox->setLayout(layout);
261  return hbox;
262  }
263 
269  zoomBy(2.0);
270  }
271 
272 
278  zoomBy(4.0);
279  }
280 
281 
287  zoomBy(8.0);
288  }
289 
290 
296  zoomBy(1.0 / 2.0);
297  }
298 
299 
305  zoomBy(1.0 / 4.0);
306  }
307 
308 
314  zoomBy(1.0 / 8.0);
315  }
316 
317 
323  // zoom factor passed in is 0
324  // this will indicate to set new scale to 1 in zoomBy()
325  zoomBy(0.0);
326  }
327 
328 
340  void ZoomTool::zoomBy(double factor) {
342  if(d == NULL) return;
343  double newScale = d->scale() * factor;
344  if(newScale == 0.0) {
345  // if zoomActual was called (1:1) the factor was set to 0.
346  // change scale to 1.0
347  newScale = 1.0;
348  }
349  setScale(d, newScale);
350  updateTool();
351 
352  if(cubeViewport()->isLinked()) {
353  for(int i = 0; i < (int)cubeViewportList()->size(); i++) {
354  d = (*(cubeViewportList()))[i];
355  if(d == cubeViewport()) continue;
356  if(d->isLinked()) {
357  newScale = d->scale() * factor;
358  if(newScale == 0.0) {
359  // if zoomActual was called (1:1) the factor was set to 0.
360  // change scale to 1.0
361  newScale = 1.0;
362  }
363  setScale(d, newScale);
364  }
365  }
366  }
367  }
368 
369 
378  if(d == NULL) return;
379  setScale(d, d->fitScale(), d->cubeSamples() / 2.0, d->cubeLines() / 2.0);
380  updateTool();
381 
382  if(d->isLinked()) {
383  for(int i = 0; i < (int)cubeViewportList()->size(); i++) {
384  d = (*(cubeViewportList()))[i];
385  if(d == cubeViewport()) continue;
386  if(d->isLinked()) {
387  setScale(d, d->fitScale(), d->cubeSamples() / 2.0, d->cubeLines() / 2.0);
388  }
389  }
390  }
391  }
392 
393 
394 
404  if(d == NULL) return;
405  setScale(d, d->fitScaleWidth(), d->cubeSamples() / 2.0, d->cubeLines() / 2.0);
406  updateTool();
407 
408  if(d->isLinked()) {
409  for(int i = 0; i < (int)cubeViewportList()->size(); i++) {
410  d = (*(cubeViewportList()))[i];
411  if(d == cubeViewport()) continue;
412  if(d->isLinked()) {
413  setScale(d, d->fitScaleWidth(), d->cubeSamples() / 2.0, d->cubeLines() / 2.0);
414  }
415  }
416  }
417  }
418 
419 
430  if(d == NULL) return;
431  setScale(d, d->fitScaleHeight(), d->cubeSamples() / 2.0, d->cubeLines() / 2.0);
432  updateTool();
433 
434  if(d->isLinked()) {
435  for(int i = 0; i < (int)cubeViewportList()->size(); i++) {
436  d = (*(cubeViewportList()))[i];
437  if(d == cubeViewport()) continue;
438  if(d->isLinked()) {
439  setScale(d, d->fitScaleHeight(), d->cubeSamples() / 2.0, d->cubeLines() / 2.0);
440  }
441  }
442  }
443  }
444 
445 
456  if(d == NULL) return;
457  QString strScale = p_zoomLineEdit->text();
458  double newScale = strScale.toDouble() / 100.;
459  setScale(d, newScale);
460  d->setFocus();
461  updateTool();
462 
463  if(d->isLinked()) {
464  for(int i = 0; i < (int)cubeViewportList()->size(); i++) {
465  d = (*(cubeViewportList()))[i];
466  if(d == cubeViewport()) continue;
467  if(d->isLinked()) setScale(d, newScale);
468  }
469  }
470  }
471 
472 
479  if(cubeViewport() == NULL) {
480  p_zoomLineEdit->setText("");
481  }
482  else {
483  double scale = cubeViewport()->scale() * 100.0;
484  QString strScale;
485  strScale.setNum(scale);
486  p_zoomLineEdit->setText(strScale);
487  }
488  }
489 
490 
504  QApplication::processEvents();
506  if(!rubberBandTool()->isValid()) return;
507 
508  // The RubberBandTool has a rectangle
509  if(!rubberBandTool()->figureIsPoint()) {
510  QRect r = rubberBandTool()->rectangle();
511  if((r.width() >= 5) && (r.height() >= 5)) {
512  int x = r.x() + r.width() / 2;
513  int y = r.y() + r.height() / 2;
514  double xscale = (double) d->viewport()->width() / r.width();
515  double yscale = (double) d->viewport()->height() / r.height();
516  double newScale = xscale < yscale ? xscale : yscale;
517  if(rubberBandTool()->mouseButton() & Qt::RightButton) {
518  newScale = 1.0 / newScale;
519  }
520  newScale *= d->scale();
521  setScale(d, newScale, x, y);
522  updateTool();
523  if(d->isLinked()) {
524  for(int i = 0; i < (int)cubeViewportList()->size(); i++) {
525  d = (*(cubeViewportList()))[i];
526  if(d == cubeViewport()) continue;
527  if(d->isLinked()) {
528  int x = r.x() + r.width() / 2;
529  int y = r.y() + r.height() / 2;
530  double xscale = (double) d->viewport()->width() / r.width();
531  double yscale = (double) d->viewport()->height() / r.height();
532  double newScale = xscale < yscale ? xscale : yscale;
533  if(rubberBandTool()->mouseButton() & Qt::RightButton) {
534  newScale = 1.0 / newScale;
535  }
536  newScale *= d->scale();
537  setScale(d, newScale, x, y);
538  }
539  }
540  }
541  }
542  }
543  // The RubberBandTool has a point (mouse click)
544  else {
545  double factor = 2.0;
546  if(rubberBandTool()->mouseButton() & Qt::ControlModifier) {
547  factor = 4.0;
548  }
549  if(rubberBandTool()->mouseButton() & Qt::ShiftModifier) {
550  factor = 8.0;
551  }
552  if(rubberBandTool()->mouseButton() & Qt::RightButton) {
553  factor = 1.0 / factor;
554  }
555  if(rubberBandTool()->mouseButton() & Qt::MidButton) {
556  factor = 1.0;
557  }
558  if(rubberBandTool()->mouseButton() == Qt::MidButton + Qt::ControlModifier) {
559  factor = 0.0;
560  }
561 // MdiCubeViewport *d = cubeViewport();
562  double newScale = d->scale() * factor;
563  if(newScale == 0.0) {
564  // ctrl+middle (1:1) the factor was set to 0.
565  // change scale to 1.0
566  newScale = 1.0;
567  }
568  QPoint p = rubberBandTool()->vertices()[0];
569  setScale(d, newScale, p.x(), p.y());
570  updateTool();
571 
572  if(d->isLinked()) {
573  for(int i = 0; i < (int)cubeViewportList()->size(); i++) {
574  d = (*(cubeViewportList()))[i];
575  if(d == cubeViewport()) continue;
576  if(d->isLinked()) {
577  newScale = d->scale() * factor;
578  if(newScale == 0.0) {
579  // ctrl+middle (1:1) the factor was set to 0.
580  // change scale to 1.0
581  newScale = 1.0;
582  }
583  newScale = setScale(d, newScale, p.x(), p.y());
584  }
585  }
586  }
587  p_lastScale = newScale;
588  }
589  }
590 
591 
598  rubberBandTool()->enable(RubberBandTool::RectangleMode);
599  rubberBandTool()->enablePoints();
600  rubberBandTool()->enableAllClicks();
601  rubberBandTool()->setDrawActiveViewportOnly(false);
602  }
603 
621  double ZoomTool::setScale(MdiCubeViewport *d, double newScale) {
622 
623  double oldScale = d->scale();
624  try {
625  if (newScale <= 0.0) {
627  "Scale value must be greater than 0.",
628  _FILEINFO_);
629  }
630  d->setScale(newScale);
631  }
632  catch (IException &e) {
633  IException fullError(e,
635  "Unable to rescale image to ["
636  + IString(newScale*100) + "]",
637  _FILEINFO_);
638  QString message = fullError.toString();
639  QMessageBox::warning((QWidget *)parent(), "Warning", message);
640  newScale = oldScale;
641  d->setScale(newScale);
642  }
643  return newScale;
644  }
645 
646 
667  double ZoomTool::setScale(MdiCubeViewport *d, double newScale, int x, int y) {
668  double oldScale = d->scale();
669  try {
670  if (newScale <= 0.0) {
672  "Scale value must be greater than 0.", _FILEINFO_);
673  }
674  d->setScale(newScale, x, y);
675  }
676  catch (IException &e) {
677  IException fullError(e, IException::User,
678  "Unable to rescale image to ["
679  + IString(newScale * 100) + "]",
680  _FILEINFO_);
681  QString message = fullError.toString();
682  QMessageBox::warning((QWidget *)parent(), "Warning", message);
683  newScale = oldScale;
684  d->setScale(newScale, x, y);
685  }
686  return newScale;
687  }
688 
709  double ZoomTool::setScale(MdiCubeViewport *d, double newScale, double samp, double line) {
710  double oldScale = d->scale();
711  try {
712  if (newScale <= 0.0) {
714  "Scale value must be greater than 0.", _FILEINFO_);
715  }
716  d->setScale(newScale, samp, line);
717  }
718  catch (IException &e) {
719  IException fullError(e,
721  "Unable to rescale image to ["
722  + IString(newScale*100) + "]",
723  _FILEINFO_);
724  QString message = fullError.toString();
725  QMessageBox::warning((QWidget *)parent(), "Warning", message);
726  newScale = oldScale;
727  d->setScale(newScale, samp, line);
728  }
729  return newScale;
730  }
731 
732 }
Cube display widget for certain Isis MDI applications.
QAction * p_zoomActual
Zoom to actual size action.
Definition: ZoomTool.h:117
CubeViewportList * cubeViewportList() const
Return the list of cubeviewports.
Definition: Tool.cpp:390
double fitScaleWidth() const
Determine the scale of cube in the width to fit in the viewport.
QAction * p_zoomIn8X
Zoom in 8 times.
Definition: ZoomTool.h:111
void zoomFit()
Fits the cube in the viewport.
Definition: ZoomTool.cpp:376
void updateTool()
This method updates the line edits text to the correct zoom value.
Definition: ZoomTool.cpp:478
QList< QPoint > vertices()
This method returns the vertices.
QAction * p_zoomOut8X
Zoom out 8 times.
Definition: ZoomTool.h:115
QRect rectangle()
This method returns a rectangle from the vertices set by the RubberBandTool.
int cubeSamples() const
Return the number of samples in the cube.
QAction * p_zoomFit
Fit the cube in the viewport action.
Definition: ZoomTool.h:118
void zoomManual()
This method zooms by the value input in the line edit next to the zoom tools.
Definition: ZoomTool.cpp:454
void setScale(double scale)
Change the scale of the cube to the given parameter value.
void setDrawActiveViewportOnly(bool activeOnly=false)
This called to set whether rubber band is drawn on active viewport only rather than all linked viewpo...
void zoomIn2X()
Zooms in 2 times.
Definition: ZoomTool.cpp:268
QAction * p_zoomOut4X
Zoom out 4 times.
Definition: ZoomTool.h:114
QLineEdit * p_zoomLineEdit
Line edit for manual zoom factor.
Definition: ZoomTool.h:120
void zoomOut2X()
Zoom out 2 times.
Definition: ZoomTool.cpp:295
void zoomIn8X()
Zooms in 8 times.
Definition: ZoomTool.cpp:286
QAction * p_zoomOut2X
Zoom out 2 times.
Definition: ZoomTool.h:113
MdiCubeViewport * cubeViewport() const
Return the current cubeviewport.
Definition: Tool.h:211
void zoomFitHeight()
Slot for the &quot;Fit to Heighth&quot; menu item on the Fit button.
Definition: ZoomTool.cpp:428
ZoomTool(QWidget *parent)
ZoomTool constructor.
Definition: ZoomTool.cpp:50
void addTo(QMenu *menu)
Adds the zoom action to the given menu.
Definition: ZoomTool.cpp:127
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:38
double fitScaleHeight() const
Determine the scale of cube in heighth to fit in the viewport.
A type of error that could only have occurred due to a mistake on the user&#39;s part (e...
Definition: IException.h:134
void enableRubberBandTool()
This methods enables the RubberBandTool, it also sets the RubberBandTool to allow points and to allow...
Definition: ZoomTool.cpp:597
bool isLinked() const
Is the viewport linked with other viewports.
void zoomOut4X()
Zoom out 4 times.
Definition: ZoomTool.cpp:304
void rubberBandComplete()
This method is called when the RubberBandTool is complete.
Definition: ZoomTool.cpp:503
void zoomActual()
Zoom back to 1 to 1.
Definition: ZoomTool.cpp:322
void zoomBy(double factor)
Zoom by the given factor.
Definition: ZoomTool.cpp:340
QString toString() const
Returns a string representation of this exception.
Definition: IException.cpp:553
Isis exception class.
Definition: IException.h:99
QString toolIconDir() const
returns the path to the icon directory.
Definition: Tool.h:127
Adds specific functionality to C++ strings.
Definition: IString.h:179
QAction * p_zoomIn4X
Zoom in 4 times.
Definition: ZoomTool.h:110
Base class for the Qisis tools.
Definition: Tool.h:81
void zoomFitWidth()
Slot for the &quot;Fit to Width&quot; menu item on the Fit button.
Definition: ZoomTool.cpp:402
double scale() const
Return the scale.
Definition: CubeViewport.h:183
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widget to add to the tool bar.
Definition: ZoomTool.cpp:153
QAction * toolPadAction(ToolPad *toolpad)
Adds the action to the toolpad.
Definition: ZoomTool.cpp:106
void zoomOut8X()
Zoom out 8 times.
Definition: ZoomTool.cpp:313
double setScale(MdiCubeViewport *d, double newScale)
This method will attempt to reset the scale for the given MdiCubeViewport using the new scale value...
Definition: ZoomTool.cpp:621
int cubeLines() const
Return the number of lines in the cube.
void zoomIn4X()
Zooms in 4 times.
Definition: ZoomTool.cpp:277
QAction * p_zoomIn2X
Zoom in 2 times.
Definition: ZoomTool.h:109
double fitScale() const
Determine the scale that causes the full cube to fit in the viewport.
void enable(RubberBandMode mode, bool showIndicatorColors=false)
This is called when changing modes or turning on.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:31:54