本文整理汇总了C#中Contour.GetBoundingRectangle方法的典型用法代码示例。如果您正苦于以下问题:C# Contour.GetBoundingRectangle方法的具体用法?C# Contour.GetBoundingRectangle怎么用?C# Contour.GetBoundingRectangle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contour
的用法示例。
在下文中一共展示了Contour.GetBoundingRectangle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: contoursIntersect
private static bool contoursIntersect(Contour c1, Contour c2)
{
if (!c1.GetBoundingRectangle().Intersects(c2.GetBoundingRectangle()))
return false;
ICoordinate pointStub = null;
Segment segmentStub = new Segment();
Segment segment1 = new Segment(c1.Vertices[0], c1.Vertices[1]);
Segment segment2 = new Segment(c1.Vertices[2], c1.Vertices[3]);
Segment segment3 = new Segment(c2.Vertices[0], c2.Vertices[1]);
Segment segment4 = new Segment(c2.Vertices[3], c2.Vertices[3]);
if (PlanimetryAlgorithms.SegmentsIntersection(segment1, segment3, out pointStub, out segmentStub) != Dimension.None ||
PlanimetryAlgorithms.SegmentsIntersection(segment1, segment4, out pointStub, out segmentStub) != Dimension.None ||
PlanimetryAlgorithms.SegmentsIntersection(segment2, segment3, out pointStub, out segmentStub) != Dimension.None ||
PlanimetryAlgorithms.SegmentsIntersection(segment2, segment4, out pointStub, out segmentStub) != Dimension.None)
return true;
return false;
}