Exemplo n.º 1
0
 __tuple<Point2I, Size2I> _moveInfo(Point2I nPoint)
 {
     Point2I vector_ = nPoint._vectorFrom(mMouseDown);
     __tuple<Point2I, Point2I> tuple_ = this._moveMinMax();
     Point2I min_ = tuple_._get_0();
     Point2I max_ = tuple_._get_1();
     Size2I size_ = new Size2I();
     int width_ = max_._getX() - min_._getX();
     int height_ = max_._getY() - min_._getY();
     size_._setWidth(width_);
     size_._setHeight(height_);
     Point2I begin_ = new Point2I();
     if (vector_._getX() > 0)
     {
         begin_._setX(max_._getX());
     }
     else
     {
         begin_._setX(min_._getX());
     }
     if (vector_._getY() > 0)
     {
         begin_._setY(max_._getY());
     }
     else
     {
         begin_._setY(min_._getY());
     }
     Point2I end_ = begin_ + vector_;
     ScreenSingleton screenSingleton_ = __singleton<ScreenSingleton>._instance();
     end_ = screenSingleton_._normalPoint(end_);
     vector_ = end_ - begin_;
     return new __tuple<Point2I, Size2I>(vector_, size_);
 }