개정판 91efe37a
issue #534: Add ItemRect property to all of controls
Change-Id: Id0d640b9fd9959615758b5e55b499f97d6f38dae
MarkupToPDF/Controls/Polygon/CloudControl.cs | ||
---|---|---|
812 | 812 |
} |
813 | 813 |
|
814 | 814 |
/// <summary> |
815 |
/// return Cloud's area |
|
816 |
/// </summary> |
|
817 |
/// <author>humkyung</author> |
|
818 |
/// <date>2019.06.13</date> |
|
819 |
public override Rect ItemRect |
|
820 |
{ |
|
821 |
get |
|
822 |
{ |
|
823 |
double dMinX = double.MaxValue; |
|
824 |
double dMinY = double.MaxValue; |
|
825 |
double dMaxX = double.MinValue; |
|
826 |
double dMaxY = double.MinValue; |
|
827 |
foreach (Point pt in this.PointSet) |
|
828 |
{ |
|
829 |
dMinX = Math.Min(dMinX, pt.X); |
|
830 |
dMinY = Math.Min(dMinY, pt.Y); |
|
831 |
dMaxX = Math.Max(dMaxX, pt.X); |
|
832 |
dMaxY = Math.Max(dMaxY, pt.Y); |
|
833 |
} |
|
834 |
|
|
835 |
return new Rect(new Point(dMinX, dMinY), new Point(dMaxX, dMaxY)); |
|
836 |
} |
|
837 |
} |
|
838 |
|
|
839 |
/// <summary> |
|
815 | 840 |
/// Serialize this |
816 | 841 |
/// </summary> |
817 | 842 |
/// <param name="sUserId"></param> |
내보내기 Unified diff