개정판 a5b465dc
issue #534: Add ItemRect property to all of controls
Change-Id: Id0d640b9fd9959615758b5e55b499f97d6f38dae
MarkupToPDF/Controls/Shape/TriControl.cs | ||
---|---|---|
403 | 403 |
} |
404 | 404 |
|
405 | 405 |
/// <summary> |
406 |
/// return tricontrols' area |
|
407 |
/// </summary> |
|
408 |
/// <author>humkyung</author> |
|
409 |
/// <date>2019.06.13</date> |
|
410 |
public override Rect ItemRect |
|
411 |
{ |
|
412 |
get |
|
413 |
{ |
|
414 |
double dMinX = Math.Min(this.StartPoint.X, this.EndPoint.X); |
|
415 |
dMinX = Math.Min(this.MidPoint.X, dMinX); |
|
416 |
double dMinY = Math.Min(this.StartPoint.Y, this.EndPoint.Y); |
|
417 |
dMinY = Math.Min(this.MidPoint.Y, dMinY); |
|
418 |
double dMaxX = Math.Max(this.StartPoint.X, this.EndPoint.X); |
|
419 |
dMaxX = Math.Max(this.MidPoint.X, dMaxX); |
|
420 |
double dMaxY = Math.Max(this.StartPoint.Y, this.EndPoint.Y); |
|
421 |
dMaxY = Math.Max(this.MidPoint.Y, dMaxY); |
|
422 |
|
|
423 |
return new Rect(new Point(dMinX, dMinY), new Point(dMaxX, dMaxY)); |
|
424 |
} |
|
425 |
} |
|
426 |
|
|
427 |
/// <summary> |
|
406 | 428 |
/// Serialize this |
407 | 429 |
/// </summary> |
408 | 430 |
/// <param name="sUserId"></param> |
내보내기 Unified diff