프로젝트

일반

사용자정보

개정판 d251456f

IDd251456ff29093c83c7ce74cce90aab1cfa01f58
상위 59e0aa5f
하위 6d1a8228

백흠경이(가) 5년 이상 전에 추가함

issue #214: adjust arrow size

Change-Id: I8aa507c61ea8a6dd72eb180f30d8493feed515ac

차이점 보기:

MarkupToPDF/Controls/Text/ArrowTextControl.cs
1314 1314
                //20180910 LJY 각도에 따라.
1315 1315
                this.MidPoint = testP;
1316 1316
                //instanceGroup.Children.Add(SingleAllow(this.MidPoint, this.StartPoint, this.LineSize));
1317
                instanceGroup.Children.Add(SingleAllow(testP, this.StartPoint, this.LineSize));
1317
                instanceGroup.Children.Add(DrawSet.DrawArrow(testP, this.StartPoint, this.LineSize));
1318 1318
            }
1319 1319
            else
1320 1320
            {
......
1484 1484
                connectorMEGeometry.StartPoint = testP;
1485 1485
                //connectorSMGeometry.EndPoint = endP;
1486 1486
                //connectorMEGeometry.StartPoint = endP;
1487
                instanceGroup.Children.Add(SingleAllow(testP, this.StartPoint, this.LineSize));
1487
                instanceGroup.Children.Add(DrawSet.DrawArrow(testP, this.StartPoint, this.LineSize));
1488 1488
                #endregion
1489 1489
            }
1490 1490

  
......
1844 1844

  
1845 1845
            return _pathGeometry;
1846 1846
        }
1847
        public static PathGeometry SingleAllow(Point p2, Point p1, double lineSize)
1848
        {
1849
            double theta = Math.Atan2((p2.Y - p1.Y), (p2.X - p1.X)) * 180 / Math.PI;
1850
            PathGeometry pathGeometry = new PathGeometry();
1851
            PathFigure pathFigure = new PathFigure();
1852
            pathFigure.StartPoint = p1;
1853

  
1854
            Point lpoint = new Point(p1.X + lineSize * 2, p1.Y + lineSize * 4);
1855
            Point rpoint = new Point(p1.X - lineSize * 2, p1.Y + lineSize * 4);
1856

  
1857
            LineSegment seg1 = new LineSegment();
1858
            seg1.Point = lpoint;
1859
            pathFigure.Segments.Add(seg1);
1860

  
1861
            LineSegment seg2 = new LineSegment();
1862
            seg2.Point = rpoint;
1863
            pathFigure.Segments.Add(seg2);
1864

  
1865
            LineSegment seg3 = new LineSegment();
1866
            seg3.Point = p1;
1867
            pathFigure.Segments.Add(seg3);
1868

  
1869
            pathFigure.IsClosed = true;
1870
            pathFigure.IsFilled = true;
1871

  
1872
            pathGeometry.Figures.Add(pathFigure);
1873
            pathGeometry.FillRule = FillRule.Nonzero;
1874
            RotateTransform transform = new RotateTransform();
1875
            transform.Angle = theta - 90;
1876
            transform.CenterX = p1.X;
1877
            transform.CenterY = p1.Y;
1878
            pathGeometry.Transform = transform;
1879
            return pathGeometry;
1880
        }
1881 1847

  
1882 1848
        #region Dispose
1883 1849
        public void Dispose()

내보내기 Unified diff

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