프로젝트

일반

사용자정보

개정판 6d1a8228

ID6d1a8228a0a44411c19cc0bab227582d6570ccc5
상위 d251456f
하위 ffd70d3c

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

issue #923: optimize to draw control

Change-Id: I8dbeef611f15cabb8f742817161ef17823bc55d6

차이점 보기:

MarkupToPDF/Controls/Polygon/PolygonControl.cs
446 446
                PathGeometry pathGeometry = new PathGeometry();
447 447
                PathFigure pathFigure = new PathFigure();
448 448
                PolyLineSegment instance = new PolyLineSegment();
449

  
450
                
451 449
                foreach (var Inneritem in PointSet)
452 450
                {
453 451
                    instance.Points.Add(Inneritem);
454 452
                }
455 453
               
456

  
457 454
                StartPoint = instance.Points.First();
458 455
                pathFigure.StartPoint = StartPoint;
459 456
                EndPoint = instance.Points.Last();
MarkupToPDF/Controls/Shape/RectCloudControl.cs
432 432
            #region 사각형 만들기
433 433
            if (this.Paint != PaintSet.None)
434 434
            {
435

  
436

  
437 435
                pathFigure.StartPoint = this.StartPoint;
438 436

  
439
                LineSegment lineSegment0 = new LineSegment();
440
                lineSegment0.Point = this.StartPoint;
441
                pathFigure.Segments.Add(lineSegment0);
442

  
443
                LineSegment lineSegment1 = new LineSegment();
444
                lineSegment1.Point = this.LeftBottomPoint;
445
                pathFigure.Segments.Add(lineSegment1);
446

  
447
                LineSegment lineSegment2 = new LineSegment();
448
                lineSegment2.Point = this.EndPoint;
449
                pathFigure.Segments.Add(lineSegment2);
450

  
451
                LineSegment lineSegment3 = new LineSegment();
452
                lineSegment3.Point = this.TopRightPoint;
453
                pathFigure.Segments.Add(lineSegment3);
454

  
437
                List<Point> points = new List<Point>() { this.StartPoint, this.LeftBottomPoint, this.EndPoint, this.TopRightPoint };
438
                PolyLineSegment polyline = new PolyLineSegment(points, true);
439
                pathFigure.Segments.Add(polyline);
440
                
455 441
                PathGeometry pathGeometry = new PathGeometry();
456 442
                pathGeometry.Figures = new PathFigureCollection();
457 443
                pathFigure.IsClosed = true;
......
466 452
            /// set reverse if area is greater 0 - 2012.07.04 added by humkyung
467 453
            /// 
468 454

  
469
            //double size = MathSet.DistanceTo(this.StartPoint, this.EndPoint);
470
            //ArcLength = (size * 0.05);
471

  
472
            //if (ArcLength <= 10)
473
            //{
474
            //    ArcLength = 10;
475
            //}
476
            //강인구 수정(클라우드 사이즈)
477
            //if (ArcLength <= 3)
478
            //{
479
            //    ArcLength = 10;
480
            //}
481
            //else if (ArcLength <= 10)
482
            //{
483
            //    ArcLength = 20;
484
            //}
485
            //else if (ArcLength <= 30)
486
            //{
487
            //    ArcLength = 30;
488
            //}
489

  
490
            //ArcLength = 10;
491

  
492 455
            System.Diagnostics.Debug.WriteLine(ArcLength);
493 456
            double area = MathSet.AreaOf(new List<Point>() { this.StartPoint, this.LeftBottomPoint, this.EndPoint, this.TopRightPoint });
494 457
            bool reverse = (area > 0);
......
515 478
                }
516 479
            }
517 480

  
518

  
519
            //for (int i = 0; i < (count - 1); i++)
520
            //{
521
            //    PathFigure pathSubFigure = CloudControl.GenerateLineWithCloud(this.PointSet[i], this.PointSet[i + 1], this.ArcLength, reverse);
522
            //    _pathGeometry.Figures.Add(pathSubFigure);
523
            //}
524

  
525
            //Base_ArcPath.StrokeThickness = 3;
526
            //Base_BodyPath.StrokeThickness = 3;
527

  
528 481
            this.PathData = _pathGeometry;
529 482
            ApplyOverViewData();
530 483
            #endregion
MarkupToPDF/Controls/Shape/RectangleControl.cs
470 470

  
471 471
                pathFigure.StartPoint = this.StartPoint;
472 472

  
473
                LineSegment lineSegment1 = new LineSegment();
474
                lineSegment1.Point = this.LeftBottomPoint;
475
                pathFigure.Segments.Add(lineSegment1);
476

  
477
                LineSegment lineSegment2 = new LineSegment();
478
                lineSegment2.Point = this.EndPoint;
479
                pathFigure.Segments.Add(lineSegment2);
480

  
481
                LineSegment lineSegment3 = new LineSegment();
482
                lineSegment3.Point = this.TopRightPoint;
483
                pathFigure.Segments.Add(lineSegment3);
484

  
485
                LineSegment lineSegment0 = new LineSegment();
486
                lineSegment0.Point = this.StartPoint;
487
                pathFigure.Segments.Add(lineSegment0);
473
                List<Point> points = new List<Point>() { this.LeftBottomPoint, this.EndPoint, this.TopRightPoint, this.StartPoint };
474
                PolyLineSegment polyline = new PolyLineSegment(points, true);
475
                pathFigure.Segments.Add(polyline);
488 476

  
489 477
                PathGeometry pathGeometry = new PathGeometry();
490 478
                pathGeometry.Figures = new PathFigureCollection();
491 479
                pathGeometry.Figures.Add(pathFigure);
492 480

  
493

  
494 481
                //Base_RectPath.StrokeThickness = 3;
495 482
                this.FillColor = null;
496 483
                this.PathData = pathGeometry;
MarkupToPDF/Controls/Shape/TriControl.cs
322 322

  
323 323
            this.SetTri();
324 324
        }
325

  
325 326
        public void SetTri()
326 327
        {
327 328
            this.ApplyTemplate();
......
358 359
            }
359 360
            pathFigure.StartPoint = this.StartPoint;
360 361

  
361
            LineSegment lineSegment0 = new LineSegment();
362
            lineSegment0.Point = this.StartPoint;
363
            pathFigure.Segments.Add(lineSegment0);
364

  
365
            LineSegment lineSegment1 = new LineSegment();
366

  
367
            if (MidPoint.X != 0 && MidPoint.Y != 0)
368
            {
369
                lineSegment1.Point = this.MidPoint;
370
                pathFigure.Segments.Add(lineSegment1);
371
            }
372
            else
373
            {
374
                lineSegment1.Point = this.EndPoint;
375
                pathFigure.Segments.Add(lineSegment1);
376
            }
377

  
378
            LineSegment lineSegment2 = new LineSegment();
379
            lineSegment2.Point = this.EndPoint;
380
            pathFigure.Segments.Add(lineSegment2);
381

  
362
            List<Point> points = new List<Point>() { this.StartPoint };
363
            if (MidPoint.X != 0 && MidPoint.Y != 0) points.Add(this.MidPoint);
364
            points.Add(this.EndPoint);
382 365

  
366
            PolyLineSegment polyline = new PolyLineSegment(points , true);
367
            pathFigure.Segments.Add(polyline);
383 368

  
384 369
            PathGeometry pathGeometry = new PathGeometry();
385 370
            pathGeometry.Figures = new PathFigureCollection();
386 371
            pathFigure.IsClosed = true;
387 372
            pathGeometry.Figures.Add(pathFigure);
388
            //this.FillColor = new SolidColorBrush(Colors.Red);
389
            //Base_TriPath.StrokeThickness = 3;
390
            //FillColor = Brushes.Red;
391 373

  
392 374
            this.PathData = pathGeometry;
393 375
            ApplyOverViewData();

내보내기 Unified diff

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