개정판 d2114d3b
issue #923: add OnMoveCtrlPoint method to interface
Change-Id: If3b10f5b54eaecd8bd8fa299d702e70e05d4b97e
MarkupToPDF/Controls/Line/LineControl.cs | ||
---|---|---|
522 | 522 |
} |
523 | 523 |
|
524 | 524 |
/// <summary> |
525 |
/// move control point has same location of given pt along given delta |
|
526 |
/// </summary> |
|
527 |
/// <author>humkyung</author> |
|
528 |
/// <date>2019.06.20</date> |
|
529 |
/// <param name="pt"></param> |
|
530 |
/// <param name="dx"></param> |
|
531 |
/// <param name="dy"></param> |
|
532 |
public override void OnMoveCtrlPoint(Point pt, double dx, double dy) |
|
533 |
{ |
|
534 |
Point selected = MathSet.getNearPoint((this as IPath).PointSet, pt); |
|
535 |
selected.X += dx; |
|
536 |
selected.Y += dy; |
|
537 |
for (int i = 0; i < (this as IPath).PointSet.Count; i++) |
|
538 |
{ |
|
539 |
if (pt.Equals((this as IPath).PointSet[i])) |
|
540 |
{ |
|
541 |
(this as IPath).PointSet[i] = selected; |
|
542 |
} |
|
543 |
} |
|
544 |
this.updateControl(); |
|
545 |
} |
|
546 |
|
|
547 |
/// <summary> |
|
525 | 548 |
/// return linecontrols' area |
526 | 549 |
/// </summary> |
527 | 550 |
/// <author>humkyung</author> |
내보내기 Unified diff