本文整理汇总了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_;
}