프로젝트

일반

사용자정보

개정판 43e1d368

ID43e1d3684849725d38b5c74b43d4bb593f546d7a
상위 d91efe5c
하위 42d49521

김태성이(가) 약 2년 전에 추가함

issue #0000 코드 정리

Change-Id: I7c8ba4ef6d78a7e4f51b72f226507cddac722939

차이점 보기:

MarkupToPDF/Controls/Text/TextControl.cs
364 364
            int count = pData.Count;
365 365
            for (int i = 0; i < count; i++)
366 366
            {
367
                PathFigure pathFigure = GenerateLineWithCloud(pData[i % count], pData[(i + 1) % count], 20, reverse);
367
                PathFigure pathFigure = Polygon.CloudControl.GenerateLineWithCloud(pData[i % count], pData[(i + 1) % count], 20, reverse);
368 368
                pathFigure.IsClosed = false;
369 369
                pathFigure.IsFilled = true;
370 370
                _pathGeometry.Figures.Add(pathFigure);
......
394 394
            return _pathGeometry;
395 395
        }
396 396

  
397
        public static PathFigure GenerateLineWithCloud(Point p1, Point p2, double _arcLength, bool reverse)
398
        {
399
            PathFigure pathFigure = new PathFigure();
400
            pathFigure.StartPoint = p1;
401

  
402
            double arcLength = _arcLength;
403
            double dx = p2.X - p1.X;
404
            double dy = p2.Y - p1.Y;
405
            double l = MathSet.DistanceTo(p1, p2);
406
            double theta = Math.Atan2(Math.Abs(dy), Math.Abs(dx)) * 180 / Math.PI;
407
            Point lastPt = new Point(p1.X, p1.Y);
408
            double count = l / _arcLength;
409

  
410
            dx /= l;
411
            dy /= l;
412

  
413
            Double j = 1;
414
            for (j = 1; j < (count - 1); j++)
415
            {
416
                ArcSegment arcSeg = new ArcSegment();
417
                arcSeg.Size = new Size(arcLength * TextControl._CloudArcDepth, arcLength * TextControl._CloudArcDepth);
418
                arcSeg.Point = new Point(p1.X + j * dx * arcLength, p1.Y + j * dy * arcLength);
419
                lastPt = arcSeg.Point;
420
                arcSeg.RotationAngle = theta + 90;
421
                if (true == reverse)
422
                    arcSeg.SweepDirection = SweepDirection.Clockwise;
423
                pathFigure.Segments.Add(arcSeg);
424
            }
397
        //public static PathFigure GenerateLineWithCloud(Point p1, Point p2, double _arcLength, bool reverse)
398
        //{
399
        //    PathFigure pathFigure = new PathFigure();
400
        //    pathFigure.StartPoint = p1;
401

  
402
        //    double arcLength = _arcLength;
403
        //    double dx = p2.X - p1.X;
404
        //    double dy = p2.Y - p1.Y;
405
        //    double l = MathSet.DistanceTo(p1, p2);
406
        //    double theta = Math.Atan2(Math.Abs(dy), Math.Abs(dx)) * 180 / Math.PI;
407
        //    Point lastPt = new Point(p1.X, p1.Y);
408
        //    double count = l / _arcLength;
409

  
410
        //    dx /= l;
411
        //    dy /= l;
412

  
413
        //    Double j = 1;
414
        //    for (j = 1; j < (count - 1); j++)
415
        //    {
416
        //        ArcSegment arcSeg = new ArcSegment();
417
        //        arcSeg.Size = new Size(arcLength * TextControl._CloudArcDepth, arcLength * TextControl._CloudArcDepth);
418
        //        arcSeg.Point = new Point(p1.X + j * dx * arcLength, p1.Y + j * dy * arcLength);
419
        //        lastPt = arcSeg.Point;
420
        //        arcSeg.RotationAngle = theta + 90;
421
        //        if (true == reverse)
422
        //            arcSeg.SweepDirection = SweepDirection.Clockwise;
423
        //        pathFigure.Segments.Add(arcSeg);
424
        //    }
425 425

  
426
            if ((count > j) || count > 0)
427
            {
428
                arcLength = MathSet.DistanceTo(lastPt, p2);
429
                ArcSegment arcSeg = new ArcSegment();
430
                arcSeg.Size = new Size(arcLength * TextControl._CloudArcDepth, arcLength * TextControl._CloudArcDepth);
431
                arcSeg.Point = new Point(p2.X, p2.Y);
432
                arcSeg.RotationAngle = theta;
426
        //    if ((count > j) || count > 0)
427
        //    {
428
        //        arcLength = MathSet.DistanceTo(lastPt, p2);
429
        //        ArcSegment arcSeg = new ArcSegment();
430
        //        arcSeg.Size = new Size(arcLength * TextControl._CloudArcDepth, arcLength * TextControl._CloudArcDepth);
431
        //        arcSeg.Point = new Point(p2.X, p2.Y);
432
        //        arcSeg.RotationAngle = theta;
433 433

  
434
                if (true == reverse)
435
                    arcSeg.SweepDirection = SweepDirection.Clockwise;
434
        //        if (true == reverse)
435
        //            arcSeg.SweepDirection = SweepDirection.Clockwise;
436 436

  
437
                pathFigure.Segments.Add(arcSeg);
437
        //        pathFigure.Segments.Add(arcSeg);
438 438

  
439
            }
440
            return pathFigure;
441
        }
439
        //    }
440
        //    return pathFigure;
441
        //}
442 442
        #endregion
443 443

  
444 444
        #region Dependency Properties

내보내기 Unified diff

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