프로젝트

일반

사용자정보

개정판 5a6a5dd1

ID5a6a5dd16606eea61d85d0fb0517fe5aa77e5192
상위 a69467b1
하위 5a9353a9

humkyung 이(가) 6년 이상 전에 추가함

fixed issue #56: 정삼각형을 그릴때 Axis Lock 적용

차이점 보기:

IKCOM/obj/Release/IKCOM.csproj.CoreCompileInputs.cache
1
333d5c25ca1359fafe4dea812620b03cf1834e02
IKCOM/obj/Release/IKCOM.csproj.FileListAbsolute.txt
1
F:\Project_NEW\KCOM\IKCOM\bin\Release\IKCOM.dll
2
F:\Project_NEW\KCOM\IKCOM\bin\Release\IKCOM.pdb
3
F:\Project_NEW\KCOM\IKCOM\bin\Release\KCOMDataModel.dll
4
F:\Project_NEW\KCOM\IKCOM\bin\Release\KCOMDataModel.pdb
5
F:\Project_NEW\KCOM\IKCOM\bin\Release\KCOMDataModel.dll.config
6
F:\Project_NEW\KCOM\IKCOM\obj\Release\IKCOM.csprojResolveAssemblyReference.cache
7
F:\Project_NEW\KCOM\IKCOM\obj\Release\IKCOM.csproj.CoreCompileInputs.cache
8
F:\Project_NEW\KCOM\IKCOM\obj\Release\IKCOM.dll
9
F:\Project_NEW\KCOM\IKCOM\obj\Release\IKCOM.pdb
10
C:\Users\Admin\Downloads\KCOM 2018-02-04(통합)\IKCOM\obj\Release\IKCOM.csprojResolveAssemblyReference.cache
11
C:\Users\Admin\Downloads\KCOM 2018-02-04(통합)\IKCOM\obj\Release\IKCOM.csproj.CoreCompileInputs.cache
12
C:\Users\Admin\Downloads\KCOM 2018-02-04(통합)\IKCOM\obj\Release\IKCOM.dll
13
C:\Users\Admin\Downloads\KCOM 2018-02-04(통합)\IKCOM\obj\Release\IKCOM.pdb
KCOM/Controls/AdornerFinal.xaml.cs
428 428
            AdornerBorder.MinWidth = 10;
429 429
            AdornerBorder.MinHeight = 10;
430 430

  
431
            double minX = 10000;
432
            double minY = 10000;
433
            double maxX = 0;
434
            double maxY = 0;
431
            double minX = double.MaxValue;
432
            double minY = double.MaxValue;
433
            double maxX = double.MinValue;
434
            double maxY = double.MinValue;
435 435

  
436 436
            if (MemberSet.Count == 1)
437 437
            {
......
2116 2116
            //    }
2117 2117
            //}
2118 2118
        }
2119

  
2119 2120
        /// <summary>
2120 2121
        /// 회전
2121 2122
        /// </summary>
......
2123 2124
        /// <param name="e"></param>
2124 2125
        public void rotate_DragDelta(object sender, DragDeltaEventArgs e)
2125 2126
        {
2126
            //DragThumb.Cursor = Cursors.SizeAll;
2127
            //System.Windows.Resources.StreamResourceInfo info = Application.GetResourceStream(new Uri("/KCOM;component/Resources/Images/AdornerImage/sync.cur", UriKind.Relative));
2128
            //rotateTop.Cursor = new System.Windows.Input.Cursor(info.Stream);
2129

  
2130
            //rotateTop.Cursor = new System.Windows.Input.Cursor("../sync.cur");
2131

  
2132
            //if(e.VerticalChange > 10)
2133
            //{
2134
            //    System.Diagnostics.Debug.WriteLine("Width" + ((e.Source as Thumb).Parent as Grid).Width);
2135
            //    System.Diagnostics.Debug.WriteLine("e.HorizontalChange : " + e.HorizontalChange);
2136
            //}
2137

  
2138 2127
            MoveRotate(e);
2139 2128
        }
2140 2129

  
......
2199 2188
            #endregion
2200 2189

  
2201 2190
            //강인구 수정
2202
            AngleValue = AngleValue + dDeltaAngle;
2191
            //AngleValue = AngleValue + dDeltaAngle;
2203 2192
            #endregion
2204 2193

  
2205 2194
            #region 센터 포인트 구하기 (그룹핑)
......
2207 2196
            {
2208 2197
                if (item.DrawingData.GetType().Name == "TextControl")
2209 2198
                {
2199
                    //double X = Canvas.GetLeft((item.DrawingData as TextControl));
2200
                    //double Y = Canvas.GetTop((item.DrawingData as TextControl));
2201
                    //AllPointSet.Add(new Point(X, Y));
2202
                    AllPointSet.Add((item.DrawingData as TextControl).StartPoint);
2210 2203
                }
2211 2204
                else
2212 2205
                {
......
2220 2213
            CenterPoint = MathSet.FindCentroid(AllPointSet);
2221 2214
            Point pt = Mouse.GetPosition(this);
2222 2215

  
2223
            if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name != "TextControl")
2216
            //if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name != "TextControl")
2224 2217
            {
2225 2218
                Point vec1 = new Point(this.rotatePoint.X - CenterPoint.X, this.rotatePoint.Y - CenterPoint.Y);
2226 2219
                Point vec2 = new Point(pt.X - CenterPoint.X, pt.Y - CenterPoint.Y);
2227 2220
                dDeltaAngle = (MathSet.getAngleBetweenVectors(vec1, vec2));
2228 2221
            }
2229
            else
2230
            {
2231
                if (IsTextAngle || RotateFlag)
2232
                {
2233
                    AngleValue = ((MemberSet.First() as AdornerMember).DrawingData as TextControl).Angle + 5;
2234
                }
2235
                else
2236
                {
2237
                    AngleValue = ((MemberSet.First() as AdornerMember).DrawingData as TextControl).Angle - 5;
2238
                }
2239
            }
2222
            //else
2223
            //{
2224
            //    //if (IsTextAngle || RotateFlag)
2225
            //    //{
2226
            //    //    AngleValue = ((MemberSet.First() as AdornerMember).DrawingData as TextControl).Angle + 5;
2227
            //    //}
2228
            //    //else
2229
            //    //{
2230
            //    //    AngleValue = ((MemberSet.First() as AdornerMember).DrawingData as TextControl).Angle - 5;
2231
            //    //}
2232
            //}
2240 2233

  
2241 2234
            AngleValue += dDeltaAngle;
2242 2235
            if (AngleValue > 360) AngleValue -= 360;
......
2256 2249
                        Canvas.SetLeft(thumb, value.X);
2257 2250
                        Canvas.SetTop(thumb, value.Y);
2258 2251

  
2252
                        /*
2259 2253
                        if (item.DrawingData.GetType().Name == "ArrowTextControl" && thumb == item.ThumbList.Last())
2260 2254
                        {
2261 2255
                            Canvas.SetLeft(thumb, Canvas.GetLeft((item.DrawingData as ArrowTextControl).Base_TextBox));
......
2320 2314
                                //Canvas.SetTop((MemberSet.First() as AdornerMember).ThumbList[1], tempP.Y);
2321 2315
                            }
2322 2316
                        }
2317
                        */
2323 2318
                    }
2324 2319

  
2325 2320
                    for (int i = 0; i < (item.DrawingData as IPath).PointSet.Count(); i++)
......
2327 2322
                        (item.DrawingData as IPath).PointSet[i] = MathSet.RotateAbout(CenterPoint, (item.DrawingData as IPath).PointSet[i], dDeltaAngle);
2328 2323
                    }
2329 2324
                }
2330
                #region 컨트롤 업데이트
2325
                #region 보더 업데이트
2331 2326
                foreach (var item in MemberSet)
2332 2327
                {
2333 2328
                    switch (item.Drawingtype)
2334 2329
                    {
2335 2330
                        case ControlType.TextControl:
2336 2331
                            ((TextControl)item.DrawingData).Angle = AngleValue;
2337
                            //trRotate.Angle = AngleValue;
2338 2332

  
2339 2333
                            RectangleGeometry Data = new RectangleGeometry
2340 2334
                            {
......
2491 2485
            BorderUpdate();
2492 2486
        }
2493 2487

  
2488
        /// <summary>
2489
        /// starting rotate
2490
        /// </summary>
2491
        /// <param name="sender"></param>
2492
        /// <param name="e"></param>
2494 2493
        private void rotate_DragStarted(object sender, DragStartedEventArgs e)
2495 2494
        {
2496
            //System.Windows.Forms.Cursor.Position = new System.Drawing.Point(System.Windows.Forms.Cursor.Position.X - 150, System.Windows.Forms.Cursor.Position.Y - 150);
2497 2495
            this.rotatePoint = Mouse.GetPosition(this); /// 2018.05.09 added by humkyung
2498 2496
            rotateTop.Cursor = Cursors.SizeAll;
2499 2497

  
2500
            //CustomCursor.SetCursorTemplate(rotateTop, this.Resources["AnimatedCursor"] as DataTemplate);
2501
            //rotateTop.Cursor = Cursors.None;
2498
            /// get angle from text controls' angle if only text control exists - 2018.05.10 added by humkyung
2499
            if ((1 == MemberSet.Count) && (MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
2500
            {
2501
                this.AngleValue = ((MemberSet.First() as AdornerMember).DrawingData as TextControl).Angle;
2502
            }
2503
            /// up to here
2502 2504

  
2503
            //if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().PointSet != null)
2504
            //{
2505
            //    return;
2506
            //}
2507 2505
            if (ViewerDataModel.Instance.UndoDataList == null)
2508 2506
            {
2509 2507
                return;
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
}
KCOM_Helper/obj/Release/KCOM_Helper.csproj.CoreCompileInputs.cache
1
d83d49db6e4b7ef064d062a85365cbc282b8c2ff
MarkupToPDF/obj/x64/Debug/MarkupToPDF_MarkupCompile.i.cache
1
MarkupToPDF
2

  
3

  
4
library
5
C#
6
.cs
7
C:\Users\강인구님\Downloads\장원이소스\KCOM 2018-04-02\MarkUS\MarkupToPDF\obj\x64\Debug\
8
MarkupToPDF
9
none
10
false
11
DEBUG;TRACE
12

  
13
2-843150639
14

  
15
611084986827
16
30-464729454
17
Controls\Custom\CustomText.xaml;Themes\generic.xaml;
18

  
19
False
20

  

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)