本文整理匯總了C#中platform.include.Point2I._getY方法的典型用法代碼示例。如果您正苦於以下問題:C# Point2I._getY方法的具體用法?C# Point2I._getY怎麽用?C# Point2I._getY使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類platform.include.Point2I
的用法示例。
在下文中一共展示了Point2I._getY方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: _normalPoint
public Point2I _normalPoint(Point2I nPoint)
{
int width_ = mWidth * 2 - 3;
int height_ = mHeight * 3 - 3;
Point2I point_ = new Point2I(nPoint);
int x_ = point_._getX();
if (x_ < 3)
{
point_._setX(3);
}
if (x_ > width_)
{
point_._setX(width_);
}
int y_ = point_._getY();
if (y_ < 3)
{
point_._setY(3);
}
if (y_ > height_)
{
point_._setY(height_);
}
return point_;
}
示例2: Rect2I
public Rect2I(Point2I nPoint, Size2I nSize)
{
Point2I point_ = new Point2I();
point_._setX(nPoint._getX() + nSize._getWidth());
point_._setY(nPoint._getY() + nSize._getHeight());
__tuple<Point2I, Point2I> tuple_ = nPoint._minMax(point_);
Point2I min_ = tuple_._get_0();
Point2I max_ = tuple_._get_1();
Size2I size_ = new Size2I();
size_._setWidth(max_._getX() - min_._getX());
size_._setHeight(max_._getY() - min_._getY());
mPoint = new Point2I(min_);
mSize = new Size2I(size_);
}
示例3: _getQuadrant
public Quadrant_ _getQuadrant(Point2I nPoint)
{
Point2I center_ = _centerPoint();
int x_ = nPoint._getX() - center_._getX();
int y_ = nPoint._getY() - center_._getY();
if (0 == x_ && 0 == y_)
{
return Quadrant_.mCenter_;
}
else if (0 < x_ && 0 == y_)
{
return Quadrant_.mUdx_;
}
else if (0 < x_ && 0 > y_)
{
return Quadrant_.mFirst_;
}
else if (0 == x_ && 0 > y_)
{
return Quadrant_.mUdy_;
}
else if (0 > x_ && 0 > y_)
{
return Quadrant_.mSecond_;
}
else if (0 > x_ && 0 == y_)
{
return Quadrant_.mSdx_;
}
else if (0 > x_ && 0 < y_)
{
return Quadrant_.mThree_;
}
else if (0 == x_ && 0 < y_)
{
return Quadrant_.mSdy_;
}
else if (0 < x_ && 0 < y_)
{
return Quadrant_.mFour_;
}
else
{
return Quadrant_.mError_;
}
}
示例4: _contain
public bool _contain(Point2I nPoint)
{
return this._contain(nPoint._getX(), nPoint._getY());
}
示例5: _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_;
}
示例6: _setBeg
public void _setBeg(Point2I nBeg)
{
mBeg._setX(nBeg._getX());
mBeg._setY(nBeg._getY());
}
示例7: _drawEllipse
public static void _drawEllipse(Point2I nPoint, Graphics nGraphics, RGB nRGB, int nSize = 3)
{
Point2I result_ = new Point2I(nPoint);
result_._offset(-nSize, -nSize);
Color color_ = nRGB._getColor();
Pen pen_ = new Pen(color_);
nGraphics.DrawEllipse(pen_, result_._getX(), result_._getY(), nSize * 2, nSize * 2);
}
示例8: _offset
public override void _offset(Point2I nPoint)
{
mX += nPoint._getX();
mY += nPoint._getY();
base._offset(nPoint);
}
示例9: _connectPointY
float _connectPointY(Point2I nBeg, Point2I nEnd, int nY)
{
if (nY > nBeg._getY() && nY > nEnd._getY())
{
return default(float);
}
if (nY < nBeg._getY() && nY < nEnd._getY())
{
return default(float);
}
int y1_ = nEnd._getY() - nY;
int y0_ = nEnd._getY() - nBeg._getY();
int x_ = nEnd._getX() - nBeg._getX();
float result_ = (x_ * y1_) / y0_;
result_ = nEnd._getX() - result_;
if (result_ > nBeg._getX() && result_ > nEnd._getX())
{
return default(float);
}
if (result_ < nBeg._getX() && result_ < nEnd._getX())
{
return default(float);
}
return result_;
}
示例10: _setPoint
public void _setPoint(Point2I nPoint)
{
mX = nPoint._getX();
mY = nPoint._getY();
}
示例11: _offset
public void _offset(Point2I nPoint)
{
this._offset(nPoint._getX(), nPoint._getY());
}
示例12: _minMax
public __tuple<Point2I, Point2I> _minMax(Point2I nPoint)
{
return this._minMax(nPoint._getX(), nPoint._getY());
}
示例13: _length
public decimal _length(Point2I nPoint)
{
return this._length(nPoint._getX(), nPoint._getY());
}
示例14: _offset
public void _offset(Point2I nPoint)
{
if (null != m_tMovePoint2I)
{
this.m_tMovePoint2I(nPoint);
}
mX += nPoint._getX();
mY += nPoint._getY();
}
示例15: _distance
public double _distance(Point2I nPoint)
{
return this._distance(nPoint._getX(), nPoint._getY());
}