프로젝트

일반

사용자정보

개정판 b79d6e7f

IDb79d6e7fe47779e89433864a593fe62b9d09de65
상위 219bb41d
하위 1af0f150

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

Fix: ArrowTextControl, TextControl에 ArcLength 적용

Change-Id: I02e837c6e9e97fc48008ee3753012f8025414ffb

차이점 보기:

MarkupToPDF/Controls/Text/ArrowTextControl.cs
17 17

  
18 18
namespace MarkupToPDF.Controls.Text
19 19
{
20
    public class ArrowTextControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IPath, ITextControl, IMarkupControlData,ICommentRect
20
    public class ArrowTextControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, ITextControl, IMarkupControlData,ICommentRect
21 21
    {
22 22
        private const string PART_ArrowPath = "PART_ArrowPath";
23 23
        private const string PART_TextBox = "PART_ArrowTextBox";
......
71 71
                this.StartPoint = new Point(item.StartPoint.X, item.StartPoint.Y);
72 72
                this.EndPoint = new Point(item.EndPoint.X, item.EndPoint.Y);
73 73
                this.StrokeColor = item.StrokeColor;
74
                this.ArcLength = item.ArcLength;
74 75
                //this.DashSize = s.DashSize; 
75 76
                this.ArrowTextStyle = item.ArrowTextStyle;
76 77
                this.isHighLight = item.isHighLight;
......
373 374
            }
374 375
        }
375 376

  
377
        public Double ArcLength
378
        {
379
            get { return (Double)GetValue(ArcLengthProperty); }
380
            set
381
            {
382
                if (this.ArcLength != value)
383
                {
384
                    SetValue(ArcLengthProperty, value);
385
                    OnPropertyChanged("ArcLength");
386
                }
387
            }
388
        }
389

  
376 390
        public PathGeometry SubPathData
377 391
        {
378 392
            get { return (PathGeometry)GetValue(SubPathDataProperty); }
......
837 851
        public static readonly DependencyProperty StrokeColorProperty = DependencyProperty.Register(
838 852
                "StrokeColor", typeof(SolidColorBrush), typeof(ArrowTextControl), new PropertyMetadata(new SolidColorBrush(Colors.Red)));
839 853

  
854
        public static readonly DependencyProperty ArcLengthProperty = DependencyProperty.Register(
855
            "ArcLength", typeof(double), typeof(ArrowTextControl), new PropertyMetadata((Double)10, PointValueChanged));
856

  
840 857
        public static readonly DependencyProperty ControlTypeProperty = DependencyProperty.Register(
841 858
                "ControlType", typeof(ControlType), typeof(ArrowTextControl), new FrameworkPropertyMetadata(ControlType.ArrowTextControl));
842 859

  
......
1483 1500
                    new Point(Canvas.GetLeft(Base_TextBox) - BoxWidth, Canvas.GetTop(Base_TextBox)),
1484 1501
                    new Point(Canvas.GetLeft(Base_TextBox), Canvas.GetTop(Base_TextBox)), //위  
1485 1502
                };
1486
                SubPathData = (Generate(pCloud));
1503
                SubPathData = Generate(pCloud, this.ArcLength);
1487 1504
                PathDataInner = (GenerateInnerCloud(pCloud, angle));
1488 1505
            
1489 1506
            }//20180906 LJY Textbox guide
......
1517 1534
    #endif
1518 1535
                };
1519 1536
                //instanceGroup.Children.Add(Generate(pCloud));
1520
                SubPathData = (Generate(pCloud));
1537
                SubPathData = Generate(pCloud, this.ArcLength);
1521 1538
                PathDataInner = (GenerateInnerCloud(pCloud, angle));
1522 1539
                //   }
1523 1540
            }
......
1653 1670
            return pathFigure;
1654 1671
        }
1655 1672

  
1656
        public static PathGeometry Generate(List<Point> pData)
1673
        public static PathGeometry Generate(List<Point> pData, double _ArcLength)
1657 1674
        {
1658 1675
            var _pathGeometry = new PathGeometry();
1659 1676
            
......
1662 1679
            int count = pData.Count;
1663 1680
            for (int i = 0; i < (count - 1); i++)
1664 1681
            {
1665
                PathFigure pathFigure = Polygon.CloudControl.GenerateLineWithCloud(pData[i], pData[i + 1], 20, reverse);
1682
                PathFigure pathFigure = Polygon.CloudControl.GenerateLineWithCloud(pData[i], pData[i + 1], _ArcLength, reverse);
1666 1683
                pathFigure.IsClosed = false;
1667 1684
                pathFigure.IsFilled = false;
1668 1685
                _pathGeometry.Figures.Add(pathFigure);
......
1824 1841
                selected.Y += dy;
1825 1842
            }
1826 1843

  
1827
    int i = 0;
1844
            int i = 0;
1828 1845
            for (i = 0; i < (this as IPath).PointSet.Count; i++)
1829 1846
            {
1830 1847
                if (pt.Equals((this as IPath).PointSet[i])) break;

내보내기 Unified diff