Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyRectangle {
- public:
- MyRectangle(int px1 = 0, int py1 = 0, int px2 = 20, int py2 = 20);
- void set(int px1, int py1, int px2, int py2);
- void setx1(int pWert);
- void setx2(int pWert);
- void sety1(int pWert);
- void sety2(int pWert);
- int get_x1();
- int get_x2();
- int get_y1();
- int get_y2();
- void draw() const;
- void draw_red() const;
- bool does_not_collide_with(const MyRectangle& other) const;
- MyRectangle operator * (double d);
- protected:
- int x1, y1, x2, y2;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement