本文整理汇总了C#中IntPoint.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# IntPoint.Equals方法的具体用法?C# IntPoint.Equals怎么用?C# IntPoint.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IntPoint
的用法示例。
在下文中一共展示了IntPoint.Equals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddOutPt
private void AddOutPt(TEdge e, IntPoint pt)
{
Contract.Requires(e != null);
Contract.Requires(e.OutIdx < 0 || e.OutIdx < _polyOuts.Count);
var toFront = e.Side == EdgeSide.Left;
if (e.OutIdx < 0)
{
var outRec = CreateOutRec();
e.OutIdx = outRec.Idx;
var op = new OutPt();
outRec.Pts = op;
op.Pt = pt;
op.Next = op;
op.Prev = op;
SetHoleState(e, outRec);
}
else
{
var outRec = _polyOuts[e.OutIdx];
var op = outRec.Pts;
if (toFront && pt.Equals(op.Pt) ||
(!toFront && pt.Equals(op.Prev.Pt)))
return;
var op2 = new OutPt {
Pt = pt,
Next = op,
Prev = op.Prev
};
op2.Prev.Next = op2;
op.Prev = op2;
if (toFront)
outRec.Pts = op2;
}
}
示例2: Pt3IsBetweenPt1AndPt2
private static bool Pt3IsBetweenPt1AndPt2(IntPoint pt1, IntPoint pt2, IntPoint pt3)
{
if (pt1.Equals(pt3) || pt2.Equals(pt3))
return true;
else if (pt1.X != pt2.X)
return pt1.X < pt3.X == pt3.X < pt2.X;
else
return pt1.Y < pt3.Y == pt3.Y < pt2.Y;
}