aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/Rectangle.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-06-22 13:42:32 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2015-06-22 13:42:32 +0200
commite335b362d1abec39dec8d835adc84149e9e5b183 (patch)
tree4f81e08f2b1a5e5fdc04d1a353eed5b2f09f2f63 /src/Rectangle.cs
parent8c99bee3d98f7c3221e969c2924d87729ba7faea (diff)
positif scrolling value
scrollx and y as properties for xml binding
Diffstat (limited to 'src/Rectangle.cs')
-rwxr-xr-xsrc/Rectangle.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Rectangle.cs b/src/Rectangle.cs
index dfe819b7..0944af66 100755
--- a/src/Rectangle.cs
+++ b/src/Rectangle.cs
@@ -192,7 +192,11 @@ namespace go
{
return new Rectangle(r.X + p.X, r.Y + p.Y, r.Width, r.Height);
}
- public static bool operator ==(Rectangle r1, Rectangle r2)
+ public static Rectangle operator -(Rectangle r, Point p)
+ {
+ return new Rectangle(r.X - p.X, r.Y - p.Y, r.Width, r.Height);
+ }
+ public static bool operator ==(Rectangle r1, Rectangle r2)
{
return r1.TopLeft == r2.TopLeft && r1.Size == r2.Size ? true : false;
}