개정판 d2114d3b
issue #923: add OnMoveCtrlPoint method to interface
Change-Id: If3b10f5b54eaecd8bd8fa299d702e70e05d4b97e
MarkupToPDF/Controls/Polygon/CloudControl.cs | ||
---|---|---|
832 | 832 |
} |
833 | 833 |
|
834 | 834 |
/// <summary> |
835 |
/// move control point has same location of given pt along given delta |
|
836 |
/// </summary> |
|
837 |
/// <author>humkyung</author> |
|
838 |
/// <date>2019.06.20</date> |
|
839 |
/// <param name="pt"></param> |
|
840 |
/// <param name="dx"></param> |
|
841 |
/// <param name="dy"></param> |
|
842 |
public override void OnMoveCtrlPoint(Point pt, double dx, double dy) |
|
843 |
{ |
|
844 |
Point selected = MathSet.getNearPoint((this as IPath).PointSet, pt); |
|
845 |
selected.X += dx; |
|
846 |
selected.Y += dy; |
|
847 |
for (int i = 0; i < (this as IPath).PointSet.Count; i++) |
|
848 |
{ |
|
849 |
if (pt.Equals((this as IPath).PointSet[i])) |
|
850 |
{ |
|
851 |
(this as IPath).PointSet[i] = selected; |
|
852 |
break; |
|
853 |
} |
|
854 |
} |
|
855 |
this.updateControl(); |
|
856 |
this.DrawingCloud(); |
|
857 |
} |
|
858 |
|
|
859 |
/// <summary> |
|
835 | 860 |
/// return Cloud's area |
836 | 861 |
/// </summary> |
837 | 862 |
/// <author>humkyung</author> |
내보내기 Unified diff