![]()  | 
  
    Isis 3 Programmer Reference
    
   | 
 
#include <ViewportBufferFill.h>


Public Types | |
| enum | ActionType { none , transform , fill , stretch } | 
| This uniquely identifies which child is instantiated.  More... | |
Public Member Functions | |
| ViewportBufferFill (const QRect &rect, const int &xCoef, const double &xScale, const int &yCoef, const double &yScale, const QPoint &topLeftPixel) | |
| Constructor.   | |
| ~ViewportBufferFill () | |
| Destructor.   | |
| virtual ViewportBufferAction::ActionType | getActionType () | 
| Returns the type of this class.   | |
| double | viewportToSample (int x) | 
| Converts screen x position to cube sample position.   | |
| double | viewportToLine (int y) | 
| Converts screen y position to cube line position.   | |
| int | getRequestPosition () const | 
| Returns the current request position (>= read position)   | |
| int | getReadPosition () const | 
| Returns the current read position.   | |
| void | incReadPosition () | 
| Increment read position.   | |
| void | incRequestPosition () | 
| Increment request position.   | |
| QRect * | getRect () | 
| Returns the rect that this action is filling in screen pixels.   | |
| int | getTopmostPixelPosition () | 
| Returns the top of the X/Y bounding rect for this fill.   | |
| int | getLeftmostPixelPosition () | 
| Returns the left of the X/Y bounding rect for this fill.   | |
| bool | doneReading () | 
| Returns true if read position is past the end of the fill.   | |
| bool | shouldRequestMore () | 
| Returns true if request position is past the end of the fill.   | |
| bool | shouldPaint (int &linesToPaint) | 
| Returns true if it is recommended to paint the fill area so far.   | |
| void | stop () | 
| Cancels the current operation.   | |
| bool | started () | 
| Returns true if this is an action that takes time and has begun.   | |
| void | started (bool started) | 
| Sets started.   | |
Private Attributes | |
| unsigned int | p_readPosition | 
| Position of the cube reads.   | |
| unsigned int | p_requestPosition | 
| Position of the cube requests.   | |
| QRect * | p_rect | 
| Rect this fill represents.   | |
| QPoint * | p_topLeftPixel | 
| Top left of the viewport for this fill.   | |
| int | p_xCoef | 
| viewport to sample/line x coef   | |
| double | p_xScale | 
| viewport to sample/line x scalar   | |
| int | p_yCoef | 
| viewport to sample/line y coef   | |
| double | p_yScale | 
| viewport to sample/line y scalar   | |
| bool | p_started | 
| True if this action has begun.   | |
Static Private Attributes | |
| static const int | STEPSIZE = 20 | 
| how many cube lines per paint if painting inbetween gets re-enabled   | |
2011-04-25 Steven Lambright - Fixed a problem where 1 too few lines were being read
2015-06-30 Makayla Shepherd and Ian Humphrey - Modified stop() to keep the viewport buffer object from reading an extra line at the bottom of the viewport rectangle. This could potentially cause a crash from reading outside of the bounds. Fixes #2171.
Definition at line 29 of file ViewportBufferFill.h.
      
  | 
  inherited | 
This uniquely identifies which child is instantiated.
| Enumerator | |
|---|---|
| none | Parent was instantiated.  | 
| transform | |
| fill | |
| stretch | |
Definition at line 26 of file ViewportBufferAction.h.
| Isis::ViewportBufferFill::ViewportBufferFill | ( | const QRect & | rect, | 
| const int & | xCoef, | ||
| const double & | xScale, | ||
| const int & | yCoef, | ||
| const double & | yScale, | ||
| const QPoint & | topLeftPixel ) | 
Constructor.
| rect | |
| xCoef | |
| xScale | |
| yCoef | |
| yScale | |
| topLeftPixel | 
Definition at line 30 of file ViewportBufferFill.cpp.
References p_readPosition, p_rect, p_requestPosition, p_topLeftPixel, p_xCoef, p_xScale, p_yCoef, and p_yScale.
| Isis::ViewportBufferFill::~ViewportBufferFill | ( | ) | 
Destructor.
Definition at line 50 of file ViewportBufferFill.cpp.
References p_rect, and p_topLeftPixel.
| bool Isis::ViewportBufferFill::doneReading | ( | ) | 
Returns true if read position is past the end of the fill.
Definition at line 87 of file ViewportBufferFill.cpp.
References p_readPosition, and p_rect.
Referenced by Isis::ViewportBuffer::DataReady(), and shouldPaint().
      
  | 
  inlinevirtual | 
Returns the type of this class.
Reimplemented from Isis::ViewportBufferAction.
Definition at line 42 of file ViewportBufferFill.h.
References Isis::ViewportBufferAction::fill.
| int Isis::ViewportBufferFill::getLeftmostPixelPosition | ( | ) | 
Returns the left of the X/Y bounding rect for this fill.
Definition at line 77 of file ViewportBufferFill.cpp.
References p_topLeftPixel.
Referenced by Isis::ViewportBuffer::DataReady(), and Isis::ViewportBuffer::fillBuffer().
      
  | 
  inline | 
Returns the current read position.
Definition at line 82 of file ViewportBufferFill.h.
References p_readPosition.
Referenced by Isis::ViewportBuffer::DataReady(), and Isis::ViewportBuffer::totalUnfilledArea().
      
  | 
  inline | 
Returns the rect that this action is filling in screen pixels.
Definition at line 101 of file ViewportBufferFill.h.
References p_rect.
Referenced by Isis::ViewportBuffer::DataReady(), Isis::ViewportBuffer::reinitialize(), Isis::ViewportBuffer::requestCubeLine(), and Isis::ViewportBuffer::totalUnfilledArea().
      
  | 
  inline | 
Returns the current request position (>= read position)
Definition at line 73 of file ViewportBufferFill.h.
References p_requestPosition.
Referenced by Isis::ViewportBuffer::fillBuffer(), and Isis::ViewportBuffer::requestCubeLine().
| int Isis::ViewportBufferFill::getTopmostPixelPosition | ( | ) | 
Returns the top of the X/Y bounding rect for this fill.
Definition at line 67 of file ViewportBufferFill.cpp.
References p_topLeftPixel.
Referenced by Isis::ViewportBuffer::DataReady(), and Isis::ViewportBuffer::fillBuffer().
      
  | 
  inline | 
Increment read position.
Definition at line 87 of file ViewportBufferFill.h.
References p_readPosition.
Referenced by Isis::ViewportBuffer::DataReady(), and Isis::ViewportBuffer::fillBuffer().
      
  | 
  inline | 
Increment request position.
Definition at line 92 of file ViewportBufferFill.h.
References p_requestPosition.
Referenced by Isis::ViewportBuffer::fillBuffer(), and Isis::ViewportBuffer::requestCubeLine().
| bool Isis::ViewportBufferFill::shouldPaint | ( | int & | linesToPaint | ) | 
Returns true if it is recommended to paint the fill area so far.
| linesToPaint | 
Definition at line 118 of file ViewportBufferFill.cpp.
References doneReading(), p_readPosition, p_rect, and STEPSIZE.
| bool Isis::ViewportBufferFill::shouldRequestMore | ( | ) | 
Returns true if request position is past the end of the fill.
Definition at line 97 of file ViewportBufferFill.cpp.
References p_rect, and p_requestPosition.
Referenced by Isis::ViewportBuffer::DataReady(), and Isis::ViewportBuffer::fillBuffer().
      
  | 
  inlineinherited | 
Returns true if this is an action that takes time and has begun.
Definition at line 39 of file ViewportBufferAction.h.
References Isis::ViewportBufferAction::p_started.
Referenced by Isis::ViewportBufferAction::started().
      
  | 
  inlineinherited | 
Sets started.
| started | True if starting | 
Definition at line 48 of file ViewportBufferAction.h.
References Isis::ViewportBufferAction::p_started, and Isis::ViewportBufferAction::started().
      
  | 
  virtual | 
Cancels the current operation.
Stops filling ASAP.
Reimplemented from Isis::ViewportBufferAction.
Definition at line 105 of file ViewportBufferFill.cpp.
References p_rect, and p_requestPosition.
Referenced by Isis::ViewportBuffer::reinitialize().
      
  | 
  inline | 
Converts screen y position to cube line position.
| y | 
Definition at line 64 of file ViewportBufferFill.h.
References p_yCoef, and p_yScale.
Referenced by Isis::ViewportBuffer::DataReady(), Isis::ViewportBuffer::fillBuffer(), and Isis::ViewportBuffer::requestCubeLine().
      
  | 
  inline | 
Converts screen x position to cube sample position.
| x | 
Definition at line 53 of file ViewportBufferFill.h.
References p_xCoef, and p_xScale.
Referenced by Isis::ViewportBuffer::DataReady(), Isis::ViewportBuffer::fillBuffer(), and Isis::ViewportBuffer::requestCubeLine().
      
  | 
  private | 
Position of the cube reads.
Definition at line 117 of file ViewportBufferFill.h.
Referenced by doneReading(), getReadPosition(), incReadPosition(), shouldPaint(), and ViewportBufferFill().
      
  | 
  private | 
Rect this fill represents.
Definition at line 121 of file ViewportBufferFill.h.
Referenced by doneReading(), getRect(), shouldPaint(), shouldRequestMore(), stop(), ViewportBufferFill(), and ~ViewportBufferFill().
      
  | 
  private | 
Position of the cube requests.
Definition at line 119 of file ViewportBufferFill.h.
Referenced by getRequestPosition(), incRequestPosition(), shouldRequestMore(), stop(), and ViewportBufferFill().
      
  | 
  privateinherited | 
True if this action has begun.
Definition at line 73 of file ViewportBufferAction.h.
Referenced by Isis::ViewportBufferAction::started(), Isis::ViewportBufferAction::started(), and Isis::ViewportBufferAction::ViewportBufferAction().
      
  | 
  private | 
Top left of the viewport for this fill.
Definition at line 123 of file ViewportBufferFill.h.
Referenced by getLeftmostPixelPosition(), getTopmostPixelPosition(), ViewportBufferFill(), and ~ViewportBufferFill().
      
  | 
  private | 
viewport to sample/line x coef
Definition at line 125 of file ViewportBufferFill.h.
Referenced by ViewportBufferFill(), and viewportToSample().
      
  | 
  private | 
viewport to sample/line x scalar
Definition at line 127 of file ViewportBufferFill.h.
Referenced by ViewportBufferFill(), and viewportToSample().
      
  | 
  private | 
viewport to sample/line y coef
Definition at line 129 of file ViewportBufferFill.h.
Referenced by ViewportBufferFill(), and viewportToLine().
      
  | 
  private | 
viewport to sample/line y scalar
Definition at line 131 of file ViewportBufferFill.h.
Referenced by ViewportBufferFill(), and viewportToLine().
      
  | 
  staticprivate | 
how many cube lines per paint if painting inbetween gets re-enabled
Definition at line 134 of file ViewportBufferFill.h.
Referenced by shouldPaint().