개정판 6d1a8228
issue #923: optimize to draw control
Change-Id: I8dbeef611f15cabb8f742817161ef17823bc55d6
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 |
내보내기 Unified diff