本文整理匯總了C#中platform.include.Point2I._vectorFrom方法的典型用法代碼示例。如果您正苦於以下問題:C# Point2I._vectorFrom方法的具體用法?C# Point2I._vectorFrom怎麽用?C# Point2I._vectorFrom使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類platform.include.Point2I
的用法示例。
在下文中一共展示了Point2I._vectorFrom方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: _moveInfo
__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_);
}