1、点结构:Point, PointF
Point(int x, int y); PointF(float x, float y);
2、尺寸结构:Size, SizeF
3、矩形结构:Rectangle, RectangleFSize(int width, int height); SizeF(float width, float height);
属性x和y:矩形结构左上角的x、y坐标;
只读属性Left和Top:矩形结构左上角的x、y坐标;
属性width和height:矩形结构的宽度和高度;
只读属性:矩形结构的尺寸;
构造函数:
4、颜色结构:ColorRectangle(Point location, Size size); RectangleF(PointF location, SizeF size); Rectangle(int x, int y, int width, int height); RectangleF(float x, float y, float width, float height);
public static Color FromArgb(int alpha, int rr, int gg, int bb); public static Color FromArgb(int rr, int gg, int bb); //透明度默认255,即完全不透明; public static Color FromArgb(int alpha, Color color);