개정판 e65e8c5c
Fix: 회전 로직 수정
Change-Id: I8f2e7b85a1365f06764fbd9203f29594610b14c5
MarkupToPDF/Controls/Shape/RectCloudControl.cs | ||
---|---|---|
517 | 517 |
this.TopRightPoint = new Point(this.PointSet[3].X, this.PointSet[3].Y); |
518 | 518 |
} |
519 | 519 |
|
520 |
//public static PathFigure GenerateLineWithCloud(Point p1, Point p2, double arcLength_, bool reverse) |
|
521 |
//{ |
|
522 |
// PathFigure pathFigure = new PathFigure(); |
|
523 |
// pathFigure.StartPoint = p1; |
|
524 |
|
|
525 |
// double arcLength = arcLength_; |
|
526 |
// /// draw arcs which has arcLength between p1 and p2 - 2012.06.21 added by humkyung |
|
527 |
// double dx = p2.X - p1.X; |
|
528 |
// double dy = p2.Y - p1.Y; |
|
529 |
// double l = MathSet.DistanceTo(p1, p2); /// distance between p1 and p2 |
|
530 |
// double theta = Math.Atan2(Math.Abs(dy), Math.Abs(dx)) * 180 / Math.PI; |
|
531 |
// Point lastPt = new Point(p1.X, p1.Y); |
|
532 |
// double count = l / arcLength; |
|
533 |
// /// normalize |
|
534 |
// dx /= l; |
|
535 |
// dy /= l; |
|
536 |
// Double j = 1; |
|
537 |
// for (j = 1; j < (count - 1); j++) |
|
538 |
// { |
|
539 |
// ArcSegment arcSeg = new ArcSegment(); |
|
540 |
// arcSeg.Size = new Size(arcLength * RectCloudControl._CloudArcDepth, arcLength * RectCloudControl._CloudArcDepth); /// x size and y size of arc |
|
541 |
// arcSeg.Point = new Point(p1.X + j * dx * arcLength, p1.Y + j * dy * arcLength); /// end point of arc |
|
542 |
// lastPt = arcSeg.Point; /// save last point |
|
543 |
// arcSeg.RotationAngle = theta + 90; |
|
544 |
// if (true == reverse) arcSeg.SweepDirection = SweepDirection.Clockwise; |
|
545 |
// pathFigure.Segments.Add(arcSeg); |
|
546 |
// } |
|
547 |
|
|
548 |
// /// draw arc between last point and end point |
|
549 |
// if ((count > j) || (count > 0)) |
|
550 |
// { |
|
551 |
// arcLength = MathSet.DistanceTo(lastPt, p2); |
|
552 |
// ArcSegment arcSeg = new ArcSegment(); |
|
553 |
// arcSeg.Size = new Size(arcLength * RectCloudControl._CloudArcDepth, arcLength * RectCloudControl._CloudArcDepth); /// x size and y size of arc |
|
554 |
// arcSeg.Point = new Point(p2.X, p2.Y); /// end point of arc |
|
555 |
// arcSeg.RotationAngle = theta; |
|
556 |
// if (true == reverse) arcSeg.SweepDirection = SweepDirection.Clockwise; |
|
557 |
// pathFigure.Segments.Add(arcSeg); |
|
558 |
// } |
|
559 |
// pathFigure.IsClosed = false; |
|
560 |
// pathFigure.IsFilled = false; |
|
561 |
// /// up to here |
|
562 |
// //pathFigure.IsFilled = true; |
|
563 |
// return pathFigure; |
|
564 |
//} |
|
565 |
|
|
566 | 520 |
/// <summary> |
567 | 521 |
/// call when mouse is moving while drawing control |
568 | 522 |
/// </summary> |
내보내기 Unified diff