diff options
Diffstat (limited to 'base/gfx/point.h')
-rw-r--r-- | base/gfx/point.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/gfx/point.h b/base/gfx/point.h index a70807e..c36c1d4d 100644 --- a/base/gfx/point.h +++ b/base/gfx/point.h @@ -45,6 +45,11 @@ class Point { void set_x(int x) { x_ = x; } void set_y(int y) { y_ = y; } + void Offset(int delta_x, int delta_y) { + x_ += delta_x; + y_ += delta_y; + } + bool operator==(const Point& rhs) const { return x_ == rhs.x_ && y_ == rhs.y_; } |