개정판 d2114d3b
issue #923: add OnMoveCtrlPoint method to interface
Change-Id: If3b10f5b54eaecd8bd8fa299d702e70e05d4b97e
MarkupToPDF/Controls/Line/ArrowControl_Multi.cs | ||
---|---|---|
18 | 18 |
|
19 | 19 |
namespace MarkupToPDF.Controls.Line |
20 | 20 |
{ |
21 |
|
|
22 | 21 |
public class ArrowControl_Multi : CommentUserInfo, IDisposable, INotifyPropertyChanged, IMarkupCommonData, IDashControl |
23 | 22 |
{ |
24 | 23 |
|
... | ... | |
387 | 386 |
} |
388 | 387 |
|
389 | 388 |
/// <summary> |
389 |
/// move control point has same location of given pt along given delta |
|
390 |
/// </summary> |
|
391 |
/// <author>humkyung</author> |
|
392 |
/// <date>2019.06.20</date> |
|
393 |
/// <param name="pt"></param> |
|
394 |
/// <param name="dx"></param> |
|
395 |
/// <param name="dy"></param> |
|
396 |
public override void OnMoveCtrlPoint(Point pt, double dx, double dy) |
|
397 |
{ |
|
398 |
Point selected = MathSet.getNearPoint((this as IPath).PointSet, pt); |
|
399 |
selected.X += dx; |
|
400 |
selected.Y += dy; |
|
401 |
for (int i = 0; i < (this as IPath).PointSet.Count; i++) |
|
402 |
{ |
|
403 |
if (pt.Equals((this as IPath).PointSet[i])) |
|
404 |
{ |
|
405 |
(this as IPath).PointSet[i] = selected; |
|
406 |
} |
|
407 |
} |
|
408 |
this.updateControl(); |
|
409 |
} |
|
410 |
|
|
411 |
/// <summary> |
|
390 | 412 |
/// return ArrowControl_Multi's area |
391 | 413 |
/// </summary> |
392 | 414 |
/// <author>humkyung</author> |
내보내기 Unified diff