本文整理汇总了C#中Circle.AddArc方法的典型用法代码示例。如果您正苦于以下问题:C# Circle.AddArc方法的具体用法?C# Circle.AddArc怎么用?C# Circle.AddArc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Circle
的用法示例。
在下文中一共展示了Circle.AddArc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Move
/// <summary>
/// Moves this arc by changing the circle on which it lies. Note that this
/// does NOT move the locations that represent the BC and the EC; you must
/// make separate calls to <c>PointFeature.Move</c> in order to do that.
///
/// This is called during rollforward processing (due to some changes, a circle
/// that was formerly re-used may end up being no good, so a different circle
/// needs to be referenced).
/// </summary>
/// <param name="newCircle">The new circle for the arc.</param>
/// <param name="isClockwise">True if the arc is supposed to go clockwise.</param>
internal void Move(Circle newCircle, bool isClockwise)
{
Circle oldCircle = this.Circle;
if (!Object.ReferenceEquals(oldCircle, newCircle))
{
// Cut the reference from the arc's current circle.
if (oldCircle!=null)
oldCircle.RemoveArc(this);
// Add reference to the new circle (and vice versa).
ChangeGeometry(new ArcGeometry(newCircle, StartPoint, EndPoint, isClockwise));
newCircle.AddArc(this);
}
else
Geometry.IsClockwise = isClockwise;
}