개정판 d2114d3b
issue #923: add OnMoveCtrlPoint method to interface
Change-Id: If3b10f5b54eaecd8bd8fa299d702e70e05d4b97e
MarkupToPDF/Controls/Polygon/InkControl.cs | ||
---|---|---|
539 | 539 |
} |
540 | 540 | |
541 | 541 |
/// <summary> |
542 |
/// move control point has same location of given pt along given delta |
|
543 |
/// </summary> |
|
544 |
/// <author>humkyung</author> |
|
545 |
/// <date>2019.06.20</date> |
|
546 |
/// <param name="pt"></param> |
|
547 |
/// <param name="dx"></param> |
|
548 |
/// <param name="dy"></param> |
|
549 |
public override void OnMoveCtrlPoint(Point pt, double dx, double dy) |
|
550 |
{ |
|
551 |
Point selected = MathSet.getNearPoint((this as IPath).PointSet, pt); |
|
552 |
selected.X += dx; |
|
553 |
selected.Y += dy; |
|
554 |
for (int i = 0; i < (this as IPath).PointSet.Count; i++) |
|
555 |
{ |
|
556 |
if (pt.Equals((this as IPath).PointSet[i])) |
|
557 |
{ |
|
558 |
(this as IPath).PointSet[i] = selected; |
|
559 |
break; |
|
560 |
} |
|
561 |
} |
|
562 |
this.updateControl(); |
|
563 |
} |
|
564 | ||
565 |
/// <summary> |
|
542 | 566 |
/// Serialize this |
543 | 567 |
/// </summary> |
544 | 568 |
/// <param name="sUserId"></param> |
내보내기 Unified diff