개정판 d2114d3b
issue #923: add OnMoveCtrlPoint method to interface
Change-Id: If3b10f5b54eaecd8bd8fa299d702e70e05d4b97e
MarkupToPDF/Controls/Line/ArcControl.cs | ||
---|---|---|
550 | 550 |
} |
551 | 551 |
|
552 | 552 |
/// <summary> |
553 |
/// move control point has same location of given pt along given delta |
|
554 |
/// </summary> |
|
555 |
/// <author>humkyung</author> |
|
556 |
/// <date>2019.06.20</date> |
|
557 |
/// <param name="pt"></param> |
|
558 |
/// <param name="dx"></param> |
|
559 |
/// <param name="dy"></param> |
|
560 |
public override void OnMoveCtrlPoint(Point pt, double dx, double dy) |
|
561 |
{ |
|
562 |
Point selected = MathSet.getNearPoint((this as IPath).PointSet, pt); |
|
563 |
selected.X += dx; |
|
564 |
selected.Y += dy; |
|
565 |
for (int i = 0; i < (this as IPath).PointSet.Count; i++) |
|
566 |
{ |
|
567 |
if (pt.Equals((this as IPath).PointSet[i])) |
|
568 |
{ |
|
569 |
(this as IPath).PointSet[i] = selected; |
|
570 |
} |
|
571 |
} |
|
572 |
this.updateControl(); |
|
573 |
} |
|
574 |
|
|
575 |
/// <summary> |
|
553 | 576 |
/// return Arc's area |
554 | 577 |
/// </summary> |
555 | 578 |
/// <author>humkyung</author> |
내보내기 Unified diff