프로젝트

일반

사용자정보

개정판 666bb823

ID666bb8233924dabd0c76f14bc5d5cf2e6db8c3f6
상위 b1c2c6fe
하위 08be599f

이지연이(가) 9달 전에 추가함

issue #000: textControl ArcLength Save안되는 현상 수정, Line 두께에 따라 Textbox 글씨가 안보이는 현상 수정중, 텍스트Control들 LineSize만큼 넓혔을 경우 회전시 두개의 박스가 따로 노는 현상으로 주석

Change-Id: I0b51d8d41c74ab458b611de2a41ce777d613705b

차이점 보기:

KCOM/Controls/AdornerFinal.xaml.cs
673 673
                {
674 674
                    double textControlWidth;
675 675
                    double textControlHeight;
676

  
676
                    //LineSize = ((dynamic)currentControl).LineSize.Left;
677 677
                    if (((currentControl as TextControl).Base_TextBox.ActualWidth) == 0)
678 678
                    {
679 679
                        textControlWidth = ((currentControl as TextControl).Base_TextBlock.ActualWidth);
......
755 755
                }
756 756
                else 
757 757
                {
758
                    if(item.DrawingData.GetType().Name == "TriControl")
759
                        LineSize = ((MarkupToPDF.Controls.Shape.TriControl)currentControl).LineSize;
760
                    else if(item.DrawingData.GetType().Name == "RectangleControl")
761
                        LineSize = ((MarkupToPDF.Controls.Shape.RectangleControl)currentControl).LineSize;
762
                    else if (item.DrawingData.GetType().Name == "RectCloudControl")
763
                        LineSize = ((MarkupToPDF.Controls.Shape.RectCloudControl)currentControl).LineSize;
764
                    else if (item.DrawingData.GetType().Name == "CloudControl")
765
                        LineSize = ((MarkupToPDF.Controls.Polygon.CloudControl)currentControl).LineSize;
766
                    else if (item.DrawingData.GetType().Name == "PolygonControl")
767
                        LineSize = ((MarkupToPDF.Controls.Polygon.PolygonControl)currentControl).LineSize;
758
                    //if(item.DrawingData.GetType().Name == "TriControl")
759
                    //    LineSize = ((MarkupToPDF.Controls.Shape.TriControl)currentControl).LineSize;
760
                    //else if(item.DrawingData.GetType().Name == "RectangleControl")
761
                    //    LineSize = ((MarkupToPDF.Controls.Shape.RectangleControl)currentControl).LineSize;
762
                    //else if (item.DrawingData.GetType().Name == "RectCloudControl")
763
                    //    LineSize = ((MarkupToPDF.Controls.Shape.RectCloudControl)currentControl).LineSize;
764
                    //else if (item.DrawingData.GetType().Name == "CloudControl")
765
                    //    LineSize = ((MarkupToPDF.Controls.Polygon.CloudControl)currentControl).LineSize;
766
                    //else if (item.DrawingData.GetType().Name == "PolygonControl")
767
                    LineSize = ((dynamic)currentControl).LineSize;
768 768

  
769 769
                    if ((currentControl as IPath).PathData.Bounds.Left < minX) minX = (currentControl as IPath).PathData.Bounds.Left;
770 770
                    if ((currentControl as IPath).PathData.Bounds.Top < minY) minY = (currentControl as IPath).PathData.Bounds.Top;
......
773 773
                }
774 774
            }
775 775

  
776

  
776 777
            Rect ac = new Rect(minX, minY, maxX - minX, maxY - minY);
777 778
            bool addWidthSize = false;
778 779
            bool addHeightSize = false;
KCOM/Views/MainMenu.xaml.cs
4067 4067
                                    (currentControl as TextControl).CommentAngle = Ang;
4068 4068
                                    (currentControl as TextControl).ControlType_No = 2;
4069 4069
                                    (currentControl as TextControl).IsHighLight = ViewerDataModel.Instance.checkHighShape;
4070
                                    (currentControl as TextControl).ArcLength = ViewerDataModel.Instance.ArcLength;
4070 4071
                                    (currentControl as TextControl).ApplyTemplate();
4071

  
4072
                                    
4072 4073
                                    (currentControl as TextControl).SetFontFamily(this.ParentOfType<MainWindow>().dzTopMenu.GetFontFamily().FontFamily);
4073 4074

  
4074 4075
                                    (currentControl as TextControl).Base_TextBox.Focus();
MarkupToPDF/Controls/Polygon/CloudControl.cs
720 720
        public static PathFigure GenerateLineWithCloud(Point p1, Point p2, double arcLength_, bool reverse, double linesize_ = -20)
721 721
        {
722 722
            PathFigure pathFigure = new PathFigure();
723
            if (linesize_ == -20)
724
                linesize_ = arcLength_;
725
            var radius = linesize_;// linesize_;// arcLength_;
723
            //if (linesize_ == -20)
724
            //    linesize_ = arcLength_;
725
            var radius = arcLength_;
726 726
            double overlap =  5.5D / 6D;
727 727
            double delta = 2 * radius * overlap;           
728 728
            pathFigure.IsClosed = false;
......
732 732

  
733 733
            var dx = curr.X - prev.X;
734 734
            var dy = curr.Y - prev.Y;
735
             pathFigure.StartPoint =  p1; //
735
             pathFigure.StartPoint =  p1; //new Point(p1.X + (40 * dx), p1.Y + (40 * dy));//
736 736
            var len = Math.Sqrt(dx * dx + dy * dy);
737 737

  
738 738
            dx = dx / len;
......
754 754

  
755 755
                if(!double.IsNaN(x) && !double.IsNaN(y))
756 756
                {
757
                    arcSeg.Point = new Point(x, y);
757
                    arcSeg.Point = new Point(x, y); // (x + (40 * dx), y + (40 * dy));
758 758
                    arcSeg.Size = new Size(radius, radius);
759 759
                    arcSeg.IsLargeArc = true;
760 760

  
......
771 771
                    {
772 772
                        pathFigure.StartPoint = arcSeg.Point;
773 773
                    }
774
                   
774 775
                    pathFigure.Segments.Add(arcSeg);
775 776

  
776 777
                }
MarkupToPDF/Controls/Text/TextControl.cs
141 141
            this.Base_TextBox.GotFocus += new RoutedEventHandler(Base_TextBox_GotFocus);
142 142
            this.Base_TextBox.LostFocus += new RoutedEventHandler(Base_TextBox_LostFocus);            
143 143
            this.Base_TextBox.SelectionChanged += (sender, e) => MoveCustomCaret();
144
            
144

  
145
            if (Base_TextPath != null)
146
            {
147
                Base_TextPath.StrokeThickness = LineSize.Left;
148
            }
149

  
150
            //if (string.IsNullOrEmpty(this.Base_TextBox.Text))
151
            //{
152
            //    Base_TextPath.StrokeThickness = 20;
153
            //    LineSize = new Thickness(20, 20, 20, 20);
154
            //    //if (Base_TextPath != null)
155
            //    //{
156
            //    //    Base_TextPath.StrokeThickness = LineSize.Left;
157
            //    //}
158
            //}
159
            //else
160
            //{
161
            //    Base_TextPath.StrokeThickness = LineSize.Left;
162
            //}
163

  
145 164
            SetText();
146 165
            DrawingCloud();
147 166
        }
......
287 306

  
288 307
            
289 308
        }
309

  
310

  
290 311
        public void SetText()
291 312
        {
292 313
            if (IsHighLight)
......
307 328
                this.BackColor = new SolidColorBrush(Color.FromArgb(Convert.ToByte(255 * 0.1),
308 329
                    Colors.White.R, Colors.White.G, Colors.White.B));
309 330
            }
310
            if (Base_TextPath != null)
311
            {
312
                Base_TextPath.StrokeThickness = LineSize.Left;
313
            }
314
            
331
            //if (Base_TextPath != null)
332
            //{
333
            //    Base_TextPath.StrokeThickness = LineSize.Left;
334
            //}
315 335
        }
316 336

  
317 337
        public void DrawingCloud()
......
323 343
                new Point(BoxWidth + LineSize.Left * 0.5, BoxHeight + LineSize.Left * 0.5),
324 344
                new Point(BoxWidth + LineSize.Left * 0.5 ,-LineSize.Left * 0.5)
325 345
            };
346
            if (this.ArcLength == 0) this.ArcLength = 10;
326 347
            //this.Base_TextBox.Select(Base_TextBox.Text.Length, 0);
327 348
            if (Base_TextPath != null)
328 349
            {
......
342 363
                        break;
343 364
                    case 2:
344 365
                        {
366
                            List<Point> pCloud2 = new List<Point>
367
                            {
368
                                new Point(-LineSize.Left* 2 , -LineSize.Left* 2 ),
369
                                new Point(-LineSize.Left* 2 , BoxHeight + LineSize.Left * 2 ),
370
                                new Point(BoxWidth + LineSize.Left* 2 , BoxHeight + LineSize.Left * 2 ),
371
                                new Point(BoxWidth + LineSize.Left* 2  ,-LineSize.Left* 2 )
372
                            };
345 373
                            PathData = (Generate(pCloud, this.ArcLength, this.LineSize.Left));
346 374
                            PathDataInner = (GenerateInner(pCloud));
347 375
                        }
......
1263 1291
                                this.TextStyle.ToString(),
1264 1292
                                this.TextWeight.ToString(),
1265 1293
                            };
1266

  
1294
                STemp.ArcLength = this.ArcLength;
1267 1295

  
1268 1296

  
1269 1297
                if (this.UnderLine != null)
......
1313 1341
                    //인구 추가(2018.04.17)
1314 1342
                    TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]),
1315 1343
                    TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]),
1344
                    ArcLength = s.ArcLength
1316 1345
                };
1317 1346

  
1318 1347
                if (s.fontConfig.Count() == 4)
MarkupToPDF/Serialize/S_Control/Detail/S_TextControl.cs
35 35
        public bool isHighLight { get; set; } // Hex Data
36 36
        [DataMember]
37 37
        public List<String> fontConfig { get; set; } // Style , Familly , Weight, Decoration
38
        [DataMember]
39
        public double ArcLength { get; set; } // 호의 높이
38 40
        public void Dispose()
39 41
        {
40 42
            //GC.Collect(0, GCCollectionMode.Forced);

내보내기 Unified diff

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