src/viewer/svpaint.cpp
void SVPaint::SelectionHandler(const SVEvent *sv_event) {
  switch (drag_mode_) {
      // FIXME inversed x_size, y_size
    case 4: // Line
      window_->Line(sv_event->x, sv_event->y, sv_event->x - sv_event->x_size,
                    sv_event->y - sv_event->y_size);
      break;
    case 5: // Rectangle
      window_->Rectangle(sv_event->x, sv_event->y, sv_event->x - sv_event->x_size,
                         sv_event->y - sv_event->y_size);
      break;
    case 6: // Ellipse
      window_->Ellipse(sv_event->x - sv_event->x_size, sv_event->y - sv_event->y_size,
                       sv_event->x_size, sv_event->y_size);
      break;
  }
}
// Takes care of the SVET_SELECTION events.
// Depending on the drag_mode_ we are in, either draw a line, a rectangle or
// an ellipse.
Takes care of the SVET_SELECTION events.
Depending on the drag_mode_ we are in, either draw a line, a rectangle or
an ellipse.
Takes care of the SVET_SELECTION events . Depending on the drag_mode_ we are in either draw a line a rectangle or an ellipse .
void SVPaint::SelectionHandler(const SVEvent *sv_event) {
  switch (drag_mode_) {
    case 4: 
      window_->Line(sv_event->x, sv_event->y, sv_event->x - sv_event->x_size,
                    sv_event->y - sv_event->y_size);
      break;
    case 5: 
      window_->Rectangle(sv_event->x, sv_event->y, sv_event->x - sv_event->x_size,
                         sv_event->y - sv_event->y_size);
      break;
    case 6: 
      window_->Ellipse(sv_event->x - sv_event->x_size, sv_event->y - sv_event->y_size,
                       sv_event->x_size, sv_event->y_size);
      break;
  }
}
void SVPaint :: SelectionHandler ( const SVEvent * sv_event ) { switch ( drag_mode_ ) { case 4 : window_ -> Line ( sv_event -> x , sv_event -> y , sv_event -> x - sv_event -> x_size , sv_event -> y - sv_event -> y_size ) ; break ; case 5 : window_ -> Rectangle ( sv_event -> x , sv_event -> y , sv_event -> x - sv_event -> x_size , sv_event -> y - sv_event -> y_size ) ; break ; case 6 : window_ -> Ellipse ( sv_event -> x - sv_event -> x_size , sv_event -> y - sv_event -> y_size , sv_event -> x_size , sv_event -> y_size ) ; break ; } }
Takes care of the SVET_SELECTION events.
Takes care of the SVET_SELECTION events .
// FIXME inversed x_size, y_size // Line // Rectangle // Ellipse