summaryrefslogtreecommitdiff
path: root/src/interface
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-28 14:51:39 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-28 14:51:39 (GMT)
commitb5728a9e3e983460a957fa0e576b751ebfe87172 (patch)
treecb20500bc94da3fd00782981a45c9b05c6af36eb /src/interface
parent58ba7f8800403c572bae99115facc808c6dc34a3 (diff)
downloadpowder-b5728a9e3e983460a957fa0e576b751ebfe87172.zip
powder-b5728a9e3e983460a957fa0e576b751ebfe87172.tar.gz
Zoom
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/Point.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/interface/Point.h b/src/interface/Point.h
index 0d0250c..d2eff6b 100644
--- a/src/interface/Point.h
+++ b/src/interface/Point.h
@@ -32,11 +32,21 @@ struct Point
return Point(X + v.X, Y + v.Y);
}
+ inline Point operator + (const int v) const
+ {
+ return Point(X + v, Y + v);
+ }
+
inline Point operator - (const Point& v) const
{
return Point(X - v.X, Y - v.Y);
}
+ inline Point operator - (const int v) const
+ {
+ return Point(X - v, Y - v);
+ }
+
inline Point operator * (const Point& v) const
{
return Point(X * v.X, Y * v.Y);