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