개정판 5a6a5dd1
fixed issue #56: 정삼각형을 그릴때 Axis Lock 적용
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
1032 | 1032 |
|
1033 | 1033 |
getCurrentPoint = e.GetPosition(drawingRotateCanvas); |
1034 | 1034 |
|
1035 |
if (mouseButtonDown == MouseButton.Middle)
|
|
1035 |
if ((mouseButtonDown == MouseButton.Middle) || (mouseButtonDown == MouseButton.Right))
|
|
1036 | 1036 |
{ |
1037 | 1037 |
SetCursor(); |
1038 | 1038 |
Point currentCanvasDrawingMouseMovePoint = e.GetPosition(drawingRotateCanvas); |
... | ... | |
1041 | 1041 |
Vector dragOffset = currentCanvasZoomPanningMouseMovePoint - canvasZoommovingMouseDownPoint; |
1042 | 1042 |
zoomAndPanControl.ContentOffsetX -= dragOffset.X; |
1043 | 1043 |
zoomAndPanControl.ContentOffsetY -= dragOffset.Y; |
1044 |
|
|
1045 |
//SetCursor(); |
|
1046 |
//Point currentCanvasDrawingMouseMovePoint = e.GetPosition(drawingRotateCanvas); |
|
1047 |
//Point currentCanvasZoomPanningMouseMovePoint = e.GetPosition(zoomAndPanCanvas); |
|
1048 |
|
|
1049 |
//Vector dragOffset = currentCanvasZoomPanningMouseMovePoint - canvasZoommovingMouseDownPoint; |
|
1050 |
|
|
1051 |
//zoomAndPanControl.ContentOffsetX += 1; |
|
1052 |
//zoomAndPanControl.ContentOffsetY += 1; |
|
1053 |
|
|
1054 |
//zoomAndPanControl.ContentOffsetX += dragOffset.X; |
|
1055 |
//zoomAndPanControl.ContentOffsetY += dragOffset.Y; |
|
1056 | 1044 |
} |
1057 | 1045 |
|
1058 |
if (mouseButtonDown == MouseButton.Right) |
|
1059 |
{ |
|
1060 |
SetCursor(); |
|
1061 |
Point currentCanvasDrawingMouseMovePoint = e.GetPosition(drawingRotateCanvas); |
|
1062 |
Point currentCanvasZoomPanningMouseMovePoint = e.GetPosition(zoomAndPanCanvas); |
|
1063 |
|
|
1064 |
Vector dragOffset = currentCanvasZoomPanningMouseMovePoint - canvasZoommovingMouseDownPoint; |
|
1065 |
zoomAndPanControl.ContentOffsetX -= dragOffset.X; |
|
1066 |
zoomAndPanControl.ContentOffsetY -= dragOffset.Y; |
|
1067 |
} |
|
1068 |
//else if (currentControl != null && mouseHandlingMode == MouseHandlingMode.Drawing && mouseButtonDown == MouseButton.Left) |
|
1069 |
else if (mouseHandlingMode == MouseHandlingMode.Drawing && mouseButtonDown == MouseButton.Left) |
|
1046 |
if (mouseHandlingMode == MouseHandlingMode.Drawing && mouseButtonDown == MouseButton.Left) |
|
1070 | 1047 |
{ |
1071 | 1048 |
Point currentCanvasDrawingMouseMovePoint = e.GetPosition(drawingRotateCanvas); |
1072 | 1049 |
Point currentCanvasZoomPanningMouseMovePoint = e.GetPosition(zoomAndPanCanvas); |
... | ... | |
1671 | 1648 |
control.Paint = ViewerDataModel.Instance.paintSet; |
1672 | 1649 |
control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y); |
1673 | 1650 |
|
1651 |
if (ViewerDataModel.Instance.checkAxis) |
|
1652 |
{ |
|
1653 |
Point tempPoint = control.EndPoint; |
|
1654 |
ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true); |
|
1655 |
control.EndPoint = tempPoint; |
|
1656 |
} |
|
1674 | 1657 |
|
1675 | 1658 |
if (ViewerDataModel.Instance.IsPressShift) |
1676 | 1659 |
{ |
... | ... | |
5416 | 5399 |
/// <param name="StartP"></param> |
5417 | 5400 |
/// <param name="EndP"></param> |
5418 | 5401 |
/// <returns></returns> |
5419 |
private List<Point> GetRegularTrianglePoints(Point StartP, Point EndP) |
|
5402 |
/// <history>humkyung 2018.05.11 apply axis lock</history> |
|
5403 |
private List<Point> GetRegularTrianglePoints(Point StartP, Point EndP, bool bCheckAxis=false) |
|
5420 | 5404 |
{ |
5421 | 5405 |
List<Point> res = new List<Point>(); |
5422 | 5406 |
|
... | ... | |
5435 | 5419 |
return res; |
5436 | 5420 |
} |
5437 | 5421 |
} |
5438 |
} |
|
5422 |
} |
내보내기 Unified diff