using Bro.Common.Helper;
|
using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Drawing;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace Bro.Common.Model.Model
|
{
|
public class CustomizedRectangle : IComplexDisplay
|
{
|
[Category("几何特性")]
|
[Description("左上顶点X坐标")]
|
public float X { get; set; }
|
|
[Category("几何特性")]
|
[Description("左上顶点Y坐标")]
|
public float Y { get; set; }
|
|
[Category("几何特性")]
|
[Description("宽")]
|
public float Width { get; set; }
|
|
[Category("几何特性")]
|
[Description("高")]
|
public float Height { get; set; }
|
|
public string GetDisplayText()
|
{
|
return $"({X},{Y})|{Width}:{Height}";
|
}
|
|
public RectangleF GetRectangle()
|
{
|
RectangleF rect = new RectangleF(X, Y, Width, Height);
|
return rect;
|
}
|
}
|
}
|