개정판 a5b465dc
issue #534: Add ItemRect property to all of controls
Change-Id: Id0d640b9fd9959615758b5e55b499f97d6f38dae
MarkupToPDF/Controls/Shape/RectangleControl.cs | ||
---|---|---|
549 | 549 |
public event PropertyChangedEventHandler PropertyChanged; |
550 | 550 |
|
551 | 551 |
/// <summary> |
552 |
/// return rectanglecontrols' area |
|
553 |
/// </summary> |
|
554 |
public override Rect ItemRect |
|
555 |
{ |
|
556 |
get |
|
557 |
{ |
|
558 |
double dMinX = Math.Min(this.StartPoint.X, this.EndPoint.X); |
|
559 |
double dMinY = Math.Min(this.StartPoint.Y, this.EndPoint.Y); |
|
560 |
double dMaxX = Math.Max(this.StartPoint.X, this.EndPoint.X); |
|
561 |
double dMaxY = Math.Max(this.StartPoint.Y, this.EndPoint.Y); |
|
562 |
|
|
563 |
return new Rect(new Point(dMinX, dMinY), new Point(dMaxX, dMaxY)); |
|
564 |
} |
|
565 |
} |
|
566 |
|
|
567 |
/// <summary> |
|
552 | 568 |
/// Serialize this |
553 | 569 |
/// </summary> |
554 | 570 |
/// <param name="sUserId"></param> |
내보내기 Unified diff