개정판 d2114d3b
issue #923: add OnMoveCtrlPoint method to interface
Change-Id: If3b10f5b54eaecd8bd8fa299d702e70e05d4b97e
MarkupToPDF/Controls/Line/ArrowArcControl.cs | ||
---|---|---|
494 | 494 |
} |
495 | 495 |
|
496 | 496 |
/// <summary> |
497 |
/// move control point has same location of given pt along given delta |
|
498 |
/// </summary> |
|
499 |
/// <author>humkyung</author> |
|
500 |
/// <date>2019.06.20</date> |
|
501 |
/// <param name="pt"></param> |
|
502 |
/// <param name="dx"></param> |
|
503 |
/// <param name="dy"></param> |
|
504 |
public override void OnMoveCtrlPoint(Point pt, double dx, double dy) |
|
505 |
{ |
|
506 |
Point selected = MathSet.getNearPoint((this as IPath).PointSet, pt); |
|
507 |
selected.X += dx; |
|
508 |
selected.Y += dy; |
|
509 |
for (int i = 0; i < (this as IPath).PointSet.Count; i++) |
|
510 |
{ |
|
511 |
if (pt.Equals((this as IPath).PointSet[i])) |
|
512 |
{ |
|
513 |
(this as IPath).PointSet[i] = selected; |
|
514 |
} |
|
515 |
} |
|
516 |
this.updateControl(); |
|
517 |
} |
|
518 |
|
|
519 |
/// <summary> |
|
497 | 520 |
/// Serialize this |
498 | 521 |
/// </summary> |
499 | 522 |
/// <param name="sUserId"></param> |
내보내기 Unified diff