프로젝트

일반

사용자정보

개정판 ab7fe8c0

IDab7fe8c0b83f154298a3e83f937c7f7e21525bd0
상위 403b1956
하위 206e2c45

백흠경이(가) 9달 전에 추가함

Fix: Sign, Image Control에서 AxisLock이 설정되어 있으면 혹은 Shift Key를 누르면 크기를 정비율로 수정되도록 수정

Change-Id: I2f4b32afd4792e40bc896de780751c4680c9deee

차이점 보기:

CommonLib/Common.cs
140 140
            GetPrivateProfileString("ConnectionString", "STRING", "", strbuilder, 512, Path.Combine(AppStartFolder, "FinalService.ini"));
141 141
            return Decrypt(strbuilder.ToString(), "Doftech1073#");
142 142
        }
143

  
143 144
        private static string Decrypt(string textToDecrypt, string key)
144 145
        {
145 146
            RijndaelManaged rijndaelCipher = new RijndaelManaged();
KCOM/Controls/AdornerFinal.xaml.cs
188 188
            }
189 189
        }
190 190

  
191

  
192 191
        public bool IsTextAngle = false;
193 192
        public Rect BorderSize { get; set; }
194 193
        public bool TextCompensation = false;
......
544 543
            }
545 544
            BorderUpdate();
546 545

  
547
            if (Common.ViewerDataModel.Instance.MarkupControls_USER.Contains(member)) Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(member);
546
            if (Common.ViewerDataModel.Instance.MarkupControls_USER.Contains(member))
547
                Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(member);
548 548
        }
549 549

  
550 550
        private void ViewBoxRotate(UIElement member)
......
672 672
                    RegistryPoint(member, members.Count);
673 673
                }
674 674

  
675
                if (Common.ViewerDataModel.Instance.MarkupControls_USER.Contains(member))  Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(member); /// remove commment from mycontrols
675
                if (Common.ViewerDataModel.Instance.MarkupControls_USER.Contains(member))
676
                    Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(member); /// remove commment from mycontrols
676 677
            }
677 678

  
678 679
            BorderUpdate();
......
1120 1121
        }
1121 1122
        
1122 1123

  
1124
        /// <summary>
1125
        /// 제어점을 조정하여 크기를 수정한다.
1126
        /// </summary>
1127
        /// <param name="sender"></param>
1128
        /// <param name="e"></param>
1123 1129
        private void ResizeTm_DragDelta(object sender, DragDeltaEventArgs e)
1124 1130
        {
1125 1131
            if (sender.GetType() != typeof(MyThumb)) return;
......
1487 1493
            /// save rotatePoint
1488 1494
            this.rotatePoint = pt;
1489 1495

  
1496

  
1490 1497
            Dispatcher.BeginInvoke((Action)(() =>
1491 1498
            {
1492 1499
                foreach (var member in this.Members)
......
1501 1508
                            DragThumb.RenderTransformOrigin = new Point(0, 0);
1502 1509
                            DragThumb.RenderTransform = new RotateTransform()
1503 1510
                            {
1504

  
1505 1511
                                Angle = (member.DrawingData as CommentUserInfo).CommentAngle
1506 1512
                            };
1507 1513

  
KCOM/Events/CreateCommand.cs
57 57
        /// <param name="comments"></param>
58 58
        public void Execute(CommentUserInfo control)
59 59
        {
60
            ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
61
            {
62
                ViewerDataModel.Instance.UndoDataList.Remove(i);
63
            });
60
            ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo).ToList()
61
                .ForEach(i => 
62
                {
63
                ViewerDataModel.Instance.UndoDataList.Remove(i); 
64
                });
64 65

  
65 66
            MarkupToPDF.Common.Undo_data UndoData = new Undo_data()
66 67
            {
KCOM/Events/Implementation/TopMenuEvent.cs
2008 2008
                this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
2009 2009
                App.FileLogger.Error("Image Converter ",ex);
2010 2010

  
2011
                this.ParentOfType<MainWindow>().DialogMessage_Alert("System Error" , "Alert");
2011
                this.ParentOfType<MainWindow>().DialogMessage_Alert(ex.Message, "Alert");
2012 2012
            }
2013 2013
        }
2014 2014

  
KCOM/Events/RedoCommand.cs
47 47
        public void Execute()
48 48
        {
49 49
            AdornerFinal final;
50
            Undo_data redo = ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().OrderBy(order => order.EventTime).FirstOrDefault();
50
            Undo_data redo = ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo).ToList()
51
                .OrderBy(order => order.EventTime).FirstOrDefault();
51 52
            if (redo == null) return;
52 53

  
53 54
            SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
......
170 171
                    break;
171 172
            }
172 173

  
173
            ViewerDataModel.Instance.UndoDataList.Where(data => data.EventTime == redo.EventTime).ToList().OrderByDescending(order => order.EventTime).ToList().ForEach(i =>
174
            ViewerDataModel.Instance.UndoDataList.Where(data => data.EventTime == redo.EventTime).ToList()
175
                .OrderByDescending(order => order.EventTime).ToList().ForEach(i =>
174 176
            {
175 177
                i.IsUndo = false;
176 178
            });
KCOM/Events/UndoCommand.cs
49 49
        /// <param name="comments"></param>
50 50
        public void Push(ICollection<CommentUserInfo> comments, double dAngle)
51 51
        {
52
            List<Point> p_set = new List<Point>();
53

  
54 52
            Undo_data UndoData = new Undo_data()
55 53
            {
56 54
                IsUndo = false,
......
64 62
            foreach (var comment in comments)
65 63
            {
66 64
                multi_Undo_Data.PointSet = new List<Point>();
67
                p_set = new List<Point>();
65
                var p_set = new List<Point>();
68 66

  
69 67
                if (comment is TextControl)
70 68
                {
......
109 107
            AdornerFinal final;
110 108
            SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
111 109

  
112
            Undo_data undo = ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == false).ToList().OrderByDescending(order => order.EventTime).FirstOrDefault();
110
            Undo_data undo = ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == false).ToList()
111
                .OrderByDescending(order => order.EventTime).FirstOrDefault();
113 112
            if (undo == null) return;
114 113

  
115 114
            switch (undo.Event)
......
254 253
                    }
255 254
                    break;
256 255
            }
257
            ViewerDataModel.Instance.UndoDataList.Where(data => data.EventTime == undo.EventTime).ToList().OrderByDescending(order => order.EventTime).ToList().ForEach(i =>
256
            ViewerDataModel.Instance.UndoDataList.Where(data => data.EventTime == undo.EventTime).ToList()
257
                .OrderByDescending(order => order.EventTime).ToList().ForEach(i =>
258 258
            {
259 259
                i.IsUndo = true;
260 260
            });
KCOM/Views/MainMenu.xaml.cs
6144 6144

  
6145 6145
            multi_Undo_Data.Markup = control;
6146 6146

  
6147
            if ((control as IShapeControl) != null)
6147
            if (control is IShapeControl)
6148 6148
            {
6149 6149
                multi_Undo_Data.paint = (control as IShapeControl).Paint;
6150 6150
            }
6151
            if ((control as IDashControl) != null)
6151
            if (control is IDashControl)
6152 6152
            {
6153 6153
                multi_Undo_Data.DashSize = (control as IDashControl).DashSize;
6154 6154
            }
6155
            if ((control as IPath) != null)
6155
            if (control is IPath)
6156 6156
            {
6157 6157
                multi_Undo_Data.LineSize = (control as IPath).LineSize;
6158 6158
            }
KCOM/Views/TopMenu.xaml.cs
58 58
            var result = dialog.ShowDialog();
59 59
            if (result == System.Windows.Forms.DialogResult.OK)
60 60
            {
61
                //using (Leadtools.Codecs.RasterCodecs codecs = new Leadtools.Codecs.RasterCodecs())
62
                //{
63
                    System.Drawing.Image t_image = System.Drawing.Image.FromFile(dialog.FileName);
64

  
65
                    System.IO.MemoryStream ms = new System.IO.MemoryStream();
66
                    t_image.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
67
                    BitmapImage ix = new BitmapImage();
68
                    ix.BeginInit();
69
                    ix.CacheOption = BitmapCacheOption.OnLoad;
70
                    ix.StreamSource = ms;
71
                    ix.EndInit();
72

  
73
                    this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Source = ix;
74
                    this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Width = ix.Width;
75
                    this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Height = ix.Height;
76

  
77

  
78
                    //this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image = codecs.Load(dialog.FileName, 0, Leadtools.Codecs.CodecsLoadByteOrder.BgrOrGray, 1, 1);
79
                    //imageViewer.Image = codecs.Load(dialog.FileName, 24, Leadtools.Codecs.CodecsLoadByteOrder.BgrOrGray, 1, 1);
80
                    //imageViewer.Image.AnimationBackground = Leadtools.RasterColor.White;
81

  
82
                    //var d = imageViewer.Image.CreateThumbnail(100, 100, 24, Leadtools.RasterViewPerspective.TopLeft, Leadtools.RasterSizeFlags.None);
83
                    //RasterImageViewer vvv = new RasterImageViewer();
84
                    //vvv.Image = d;
85
                    //zoomAndPanCanvas.Children.Add(vvv);
86

  
87
                    this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Width);
88
                    this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Height);
89

  
90
                    //this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image.ImageWidth);
91
                    //this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image.ImageHeight);
92

  
93
                    Common.ViewerDataModel.Instance.ContentWidth = this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width;
94
                    Common.ViewerDataModel.Instance.ContentHeight = this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height;
95
                    //zoomAndPanControl.AnimatedScaleToFit();
96
                    this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanControl.ScaleToFit();
97
                //}
61
                System.Drawing.Image t_image = System.Drawing.Image.FromFile(dialog.FileName);
62

  
63
                System.IO.MemoryStream ms = new System.IO.MemoryStream();
64
                t_image.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
65
                BitmapImage ix = new BitmapImage();
66
                ix.BeginInit();
67
                ix.CacheOption = BitmapCacheOption.OnLoad;
68
                ix.StreamSource = ms;
69
                ix.EndInit();
70

  
71
                this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Source = ix;
72
                this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Width = ix.Width;
73
                this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Height = ix.Height;
74

  
75
                //this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image = codecs.Load(dialog.FileName, 0, Leadtools.Codecs.CodecsLoadByteOrder.BgrOrGray, 1, 1);
76
                //imageViewer.Image = codecs.Load(dialog.FileName, 24, Leadtools.Codecs.CodecsLoadByteOrder.BgrOrGray, 1, 1);
77
                //imageViewer.Image.AnimationBackground = Leadtools.RasterColor.White;
78

  
79
                //var d = imageViewer.Image.CreateThumbnail(100, 100, 24, Leadtools.RasterViewPerspective.TopLeft, Leadtools.RasterSizeFlags.None);
80
                //RasterImageViewer vvv = new RasterImageViewer();
81
                //vvv.Image = d;
82
                //zoomAndPanCanvas.Children.Add(vvv);
83

  
84
                this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Width);
85
                this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Height);
86

  
87
                //this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image.ImageWidth);
88
                //this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height = Convert.ToDouble(this.ParentOfType<MainWindow>().dzMainMenu.imageViewer.Image.ImageHeight);
89

  
90
                Common.ViewerDataModel.Instance.ContentWidth = this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Width;
91
                Common.ViewerDataModel.Instance.ContentHeight = this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanCanvas.Height;
92
                //zoomAndPanControl.AnimatedScaleToFit();
93
                this.ParentOfType<MainWindow>().dzMainMenu.zoomAndPanControl.ScaleToFit();
98 94
            }
99 95
        }
100 96
        
MarkupToPDF/Controls/Etc/ImgControl.cs
391 391
                }
392 392
            }
393 393

  
394
            var ReverseP = (i + path.PointSet.Count() / 2) % path.PointSet.Count();
395
            var PreviousP = (i + (path.PointSet.Count() - 1)) % path.PointSet.Count();
396
            var NextP = (i + 1) % path.PointSet.Count();
394
            var OppositeP = (i + path.PointSet.Count / 2) % path.PointSet.Count;
395
            var PreviousP = (i + (path.PointSet.Count - 1)) % path.PointSet.Count;
396
            var NextP = (i + 1) % path.PointSet.Count;
397
            if (bAxisLocked)
398
            {
399
                double _dx = path.PointSet[i].X - path.PointSet[OppositeP].X;
400
                double _dy = path.PointSet[i].Y - path.PointSet[OppositeP].Y;
401
                double distance = Math.Max(Math.Abs(_dx), Math.Abs(_dy));
397 402

  
398
            var distance = MathSet.DistanceTo(path.PointSet[ReverseP], path.PointSet[i]);
403
                var PreviousV = path.PointSet[PreviousP] - path.PointSet[OppositeP];
404
                PreviousV.Normalize();
405
                path.PointSet[PreviousP] = path.PointSet[OppositeP] + PreviousV * distance;
399 406

  
400
            var PreviousV = MathSet.GetNormVectorBetween(path.PointSet[ReverseP], path.PointSet[PreviousP]);
401
            var l = MathSet.DotProduct(PreviousV.X, PreviousV.Y, path.PointSet[i].X - path.PointSet[ReverseP].X,
402
                path.PointSet[i].Y - path.PointSet[ReverseP].Y);
403
            path.PointSet[PreviousP] = new Point(path.PointSet[ReverseP].X + PreviousV.X * l, path.PointSet[ReverseP].Y + PreviousV.Y * l);
407
                var NextV = path.PointSet[NextP] - path.PointSet[OppositeP];
408
                NextV.Normalize();
409
                path.PointSet[NextP] = path.PointSet[OppositeP] + NextV * distance;
404 410

  
405
            var NextV = MathSet.GetNormVectorBetween(path.PointSet[ReverseP], path.PointSet[NextP]);
406
            l = MathSet.DotProduct(NextV.X, NextV.Y, path.PointSet[i].X - path.PointSet[ReverseP].X, path.PointSet
407
                [i].Y - path.PointSet[ReverseP].Y);
408
            path.PointSet[NextP] = new Point(path.PointSet[ReverseP].X + NextV.X * l, path.PointSet[ReverseP].Y + NextV.Y * l);
411
                path.PointSet[i] = path.PointSet[OppositeP] + PreviousV * distance + NextV * distance;
412
            }
413
            else
414
            {
415
                var PreviousV = MathSet.GetNormVectorBetween(path.PointSet[OppositeP], path.PointSet[PreviousP]);
416
                var l = MathSet.DotProduct(PreviousV.X, PreviousV.Y, path.PointSet[i].X - path.PointSet[OppositeP].X,
417
                    path.PointSet[i].Y - path.PointSet[OppositeP].Y);
418
                path.PointSet[PreviousP] = new Point(path.PointSet[OppositeP].X + PreviousV.X * l, path.PointSet[OppositeP].Y + PreviousV.Y * l);
419

  
420
                var NextV = MathSet.GetNormVectorBetween(path.PointSet[OppositeP], path.PointSet[NextP]);
421
                l = MathSet.DotProduct(NextV.X, NextV.Y, path.PointSet[i].X - path.PointSet[OppositeP].X, path.PointSet
422
                    [i].Y - path.PointSet[OppositeP].Y);
423
                path.PointSet[NextP] = new Point(path.PointSet[OppositeP].X + NextV.X * l, path.PointSet[OppositeP].Y + NextV.Y * l);
424
            }
409 425

  
410 426
            this.UpdateControl();
411 427
        }
MarkupToPDF/Controls/Etc/SignControl.cs
370 370
                }
371 371
            }
372 372

  
373
            var ReverseP = (i + path.PointSet.Count() / 2) % path.PointSet.Count();
374
            var PreviousP = (i + (path.PointSet.Count() - 1)) % path.PointSet.Count();
375
            var NextP = (i + 1) % path.PointSet.Count();
373
            var OppositeP = (i + path.PointSet.Count / 2) % path.PointSet.Count;
374
            var PreviousP = (i + (path.PointSet.Count - 1)) % path.PointSet.Count;
375
            var NextP = (i + 1) % path.PointSet.Count;
376 376

  
377
            var distance = MathSet.DistanceTo(path.PointSet[ReverseP], path.PointSet[i]);
377
            if (bAxisLocked)
378
            {
379
                double _dx = path.PointSet[i].X - path.PointSet[OppositeP].X;
380
                double _dy = path.PointSet[i].Y - path.PointSet[OppositeP].Y;
381
                double distance = Math.Max(Math.Abs(_dx), Math.Abs(_dy));
382

  
383
                var PreviousV = path.PointSet[PreviousP] - path.PointSet[OppositeP];
384
                PreviousV.Normalize();
385
                path.PointSet[PreviousP] = path.PointSet[OppositeP] + PreviousV * distance;
378 386

  
379
            var PreviousV = MathSet.GetNormVectorBetween(path.PointSet[ReverseP], path.PointSet[PreviousP]);
380
            var l = MathSet.DotProduct(PreviousV.X, PreviousV.Y, path.PointSet[i].X - path.PointSet[ReverseP].X,
381
                path.PointSet[i].Y - path.PointSet[ReverseP].Y);
382
            path.PointSet[PreviousP] = new Point(path.PointSet[ReverseP].X + PreviousV.X * l, path.PointSet[ReverseP].Y + PreviousV.Y * l);
387
                var NextV = path.PointSet[NextP] - path.PointSet[OppositeP];
388
                NextV.Normalize();
389
                path.PointSet[NextP] = path.PointSet[OppositeP] + NextV * distance;
383 390

  
384
            var NextV = MathSet.GetNormVectorBetween(path.PointSet[ReverseP], path.PointSet[NextP]);
385
            l = MathSet.DotProduct(NextV.X, NextV.Y, path.PointSet[i].X - path.PointSet[ReverseP].X, path.PointSet
386
                [i].Y - path.PointSet[ReverseP].Y);
387
            path.PointSet[NextP] = new Point(path.PointSet[ReverseP].X + NextV.X * l, path.PointSet[ReverseP].Y + NextV.Y * l);
391
                path.PointSet[i] = path.PointSet[OppositeP] + PreviousV * distance + NextV * distance;
392
            }
393
            else
394
            {
395
                var PreviousV = MathSet.GetNormVectorBetween(path.PointSet[OppositeP], path.PointSet[PreviousP]);
396
                var l = MathSet.DotProduct(PreviousV.X, PreviousV.Y, path.PointSet[i].X - path.PointSet[OppositeP].X,
397
                    path.PointSet[i].Y - path.PointSet[OppositeP].Y);
398
                path.PointSet[PreviousP] = new Point(path.PointSet[OppositeP].X + PreviousV.X * l, path.PointSet[OppositeP].Y + PreviousV.Y * l);
399

  
400
                var NextV = MathSet.GetNormVectorBetween(path.PointSet[OppositeP], path.PointSet[NextP]);
401
                l = MathSet.DotProduct(NextV.X, NextV.Y, path.PointSet[i].X - path.PointSet[OppositeP].X, path.PointSet
402
                    [i].Y - path.PointSet[OppositeP].Y);
403
                path.PointSet[NextP] = new Point(path.PointSet[OppositeP].X + NextV.X * l, path.PointSet[OppositeP].Y + NextV.Y * l);
404
            }
388 405

  
389 406
            this.UpdateControl();
390 407
        }
MarkupToPDF/Controls/Etc/SymControlN.cs
408 408
                }
409 409
            }
410 410

  
411
            var ReverseP = (i + path.PointSet.Count / 2) % path.PointSet.Count;
411
            var OppositeP = (i + path.PointSet.Count / 2) % path.PointSet.Count;
412 412
            var PreviousP = (i + (path.PointSet.Count - 1)) % path.PointSet.Count;
413 413
            var NextP = (i + 1) % path.PointSet.Count;
414
            if (bAxisLocked)
415
            {
416
                double _dx = path.PointSet[i].X - path.PointSet[OppositeP].X;
417
                double _dy = path.PointSet[i].Y - path.PointSet[OppositeP].Y;
418
                double distance = Math.Max(Math.Abs(_dx), Math.Abs(_dy));
414 419

  
415
            var distance = MathSet.DistanceTo(path.PointSet[ReverseP], path.PointSet[i]);
420
                var PreviousV = path.PointSet[PreviousP] - path.PointSet[OppositeP];
421
                PreviousV.Normalize();
422
                path.PointSet[PreviousP] = path.PointSet[OppositeP] + PreviousV * distance;
416 423

  
417
            var PreviousV = MathSet.GetNormVectorBetween(path.PointSet[ReverseP], path.PointSet[PreviousP]);
418
            var l = MathSet.DotProduct(PreviousV.X, PreviousV.Y, path.PointSet[i].X - path.PointSet[ReverseP].X,
419
                path.PointSet[i].Y - path.PointSet[ReverseP].Y);
420
            path.PointSet[PreviousP] = new Point(path.PointSet[ReverseP].X + PreviousV.X * l, path.PointSet[ReverseP].Y + PreviousV.Y * l);
424
                var NextV = path.PointSet[NextP] - path.PointSet[OppositeP];
425
                NextV.Normalize();
426
                path.PointSet[NextP] = path.PointSet[OppositeP] + NextV * distance;
421 427

  
422
            var NextV = MathSet.GetNormVectorBetween(path.PointSet[ReverseP], path.PointSet[NextP]);
423
            l = MathSet.DotProduct(NextV.X, NextV.Y, path.PointSet[i].X - path.PointSet[ReverseP].X, path.PointSet
424
                [i].Y - path.PointSet[ReverseP].Y);
425
            path.PointSet[NextP] = new Point(path.PointSet[ReverseP].X + NextV.X * l, path.PointSet[ReverseP].Y + NextV.Y * l);
428
                path.PointSet[i] = path.PointSet[OppositeP] + PreviousV * distance + NextV * distance;
429
            }
430
            else
431
            {
432
                var PreviousV = MathSet.GetNormVectorBetween(path.PointSet[OppositeP], path.PointSet[PreviousP]);
433
                var l = MathSet.DotProduct(PreviousV.X, PreviousV.Y, path.PointSet[i].X - path.PointSet[OppositeP].X,
434
                    path.PointSet[i].Y - path.PointSet[OppositeP].Y);
435
                path.PointSet[PreviousP] = new Point(path.PointSet[OppositeP].X + PreviousV.X * l, path.PointSet[OppositeP].Y + PreviousV.Y * l);
436

  
437
                var NextV = MathSet.GetNormVectorBetween(path.PointSet[OppositeP], path.PointSet[NextP]);
438
                l = MathSet.DotProduct(NextV.X, NextV.Y, path.PointSet[i].X - path.PointSet[OppositeP].X, path.PointSet
439
                    [i].Y - path.PointSet[OppositeP].Y);
440
                path.PointSet[NextP] = new Point(path.PointSet[OppositeP].X + NextV.X * l, path.PointSet[OppositeP].Y + NextV.Y * l);
441
            }
426 442

  
427 443
            this.UpdateControl();
428 444
        }

내보내기 Unified diff

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