本文整理匯總了C#中platform.include.Point2I._setPoint方法的典型用法代碼示例。如果您正苦於以下問題:C# Point2I._setPoint方法的具體用法?C# Point2I._setPoint怎麽用?C# Point2I._setPoint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類platform.include.Point2I
的用法示例。
在下文中一共展示了Point2I._setPoint方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: _moveMinMax
__tuple<Point2I, Point2I> _moveMinMax()
{
Point2I min_ = new Point2I(65536, 65536);
Point2I max_ = new Point2I(0, 0);
foreach (IShape i in mSelects)
{
__tuple<Point2I, Point2I> tuple_ = i._minMax(min_, max_);
if (null == tuple_)
{
continue;
}
min_._setPoint(tuple_._get_0());
max_._setPoint(tuple_._get_1());
}
return new __tuple<Point2I, Point2I>(min_, max_);
}
示例2: _connectPoint
public Point2I _connectPoint(Point2I nBeg, Point2I nEnd)
{
if (this._contain(nEnd))
{
return nEnd;
}
if (!this._contain(nBeg))
{
return nEnd;
}
Point2I result_ = new Point2I();
int x0_ = mPoint._getX();
int x1_ = x0_ + mSize._getWidth();
int y0_ = mPoint._getY();
int y1_ = y0_ + mSize._getHeight();
if (nEnd._getY() < this._centerY())
{
if (nBeg._getY() == y0_)
{
result_._setPoint(nBeg);
return result_;
}
float temp_ = this._connectPointY(nBeg, nEnd, y0_);
if (temp_ > x0_ && temp_ < x1_)
{
int int_ = (int)temp_;
result_._setX(int_);
result_._setY(y0_);
return result_;
}
}
else
{
if (nBeg._getY() == y1_)
{
result_._setPoint(nBeg);
return result_;
}
float temp_ = this._connectPointY(nBeg, nEnd, y1_);
if (temp_ > x0_ && temp_ < x1_)
{
int int_ = (int)temp_;
result_._setX(int_);
result_._setY(y1_);
return result_;
}
}
if (nEnd._getX() > nBeg._getX())
{
result_._setX(x1_);
}
else
{
result_._setX(x0_);
}
if (nEnd._getY() > nBeg._getY())
{
result_._setY(y1_);
}
else
{
result_._setY(y0_);
}
return result_;
}