2002-10-08 06:49:11 +00:00
|
|
|
// Gdk.Point.Rectangle - Gdk Rectangle class customizations
|
|
|
|
//
|
|
|
|
// Author: Jasper van Putten <Jaspervp@gmx.net>
|
|
|
|
//
|
|
|
|
// (c) 2002 Jasper van Putten
|
|
|
|
//
|
|
|
|
// This code is inserted after the automatically generated code.
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// ToString method
|
|
|
|
/// </summary>
|
|
|
|
///
|
|
|
|
/// <remarks>
|
|
|
|
/// returns a string representation of this Rectangle
|
|
|
|
///
|
|
|
|
/// </remarks>
|
|
|
|
|
|
|
|
public override string ToString ()
|
|
|
|
{
|
2004-02-10 16:04:50 +00:00
|
|
|
return String.Format ("{0}x{1}+{2}+{3}", Width, Height, X, Y);
|
2002-10-08 06:49:11 +00:00
|
|
|
}
|
|
|
|
|
2003-03-03 17:43:22 +00:00
|
|
|
public Rectangle (int x, int y, int width, int height)
|
|
|
|
{
|
2004-02-10 16:04:50 +00:00
|
|
|
this.X = x;
|
|
|
|
this.Y = y;
|
|
|
|
this.Width = width;
|
|
|
|
this.Height = height;
|
2003-03-03 17:43:22 +00:00
|
|
|
}
|
2002-10-08 06:49:11 +00:00
|
|
|
|
2003-11-29 23:48:14 +00:00
|
|
|
public static implicit operator System.Drawing.Rectangle (Gdk.Rectangle rect)
|
|
|
|
{
|
2004-02-10 16:04:50 +00:00
|
|
|
return new System.Drawing.Rectangle (rect.X, rect.Y, rect.Width, rect.Height);
|
2003-11-29 23:48:14 +00:00
|
|
|
}
|
|
|
|
|