00001 #include "magic/mgobject.h"
00002
00003 decl_module (gobject);
00004
00005 void Rect::operator= (const Rect& other) {
00006 memcpy (this, &other, sizeof(Rect));
00007 }
00008
00009 void Rect::moveTo (const Coord2D& pos) {
00010 Coord2D offset (pos.x-mCorner1.x, pos.y-mCorner1.y);
00011 moveBy (offset);
00012 }
00013
00014 void Rect::moveBy (const Coord2D& offset) {
00015 mCorner1 += offset;
00016 mCorner2 += offset;
00017 }
00018
00019 bool Rect::touches (const Rect& other) const {
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 return false;
00031 }