개정판 efd9be38
좌표 곂쳤을 때 Point가 같이 따라 움직이는 문제 해결
Change-Id: I498f111d877de52acd9ded7413f5528338386d57
MarkupToPDF/Controls/Shape/TriControl.cs | ||
---|---|---|
446 | 446 |
Point selected = MathSet.getNearPoint((this as IPath).PointSet, pt); ///TODO: 위험 요소를 가지고 있음. |
447 | 447 |
selected.X += dx; |
448 | 448 |
selected.Y += dy; |
449 |
|
|
450 |
var vFirstPoint = (this as IPath).PointSet.FindAll(x => x == pt); |
|
451 |
int iIndex = 0; |
|
452 |
if (vFirstPoint != null && vFirstPoint.Count > 0) |
|
453 |
{ |
|
454 |
iIndex = (this as IPath).PointSet.IndexOf(vFirstPoint.FirstOrDefault()); |
|
455 |
} |
|
456 |
|
|
449 | 457 |
for (int i = 0; i < (this as IPath).PointSet.Count; i++) |
450 | 458 |
{ |
451 |
if (pt.Equals((this as IPath).PointSet[i]))
|
|
459 |
if (i == iIndex)
|
|
452 | 460 |
{ |
453 |
(this as IPath).PointSet[i] = selected; |
|
461 |
if (pt.Equals((this as IPath).PointSet[i])) |
|
462 |
{ |
|
463 |
(this as IPath).PointSet[i] = selected; |
|
464 |
} |
|
454 | 465 |
} |
455 | 466 |
} |
456 | 467 |
this.UpdateControl(); |
내보내기 Unified diff