5#ifndef INCLUDE_FIFECHAN_RECTANGLE_HPP_
6#define INCLUDE_FIFECHAN_RECTANGLE_HPP_
10#include "fifechan/platform.hpp"
friend std::ostream & operator<<(std::ostream &out, Rectangle const &rectangle)
Output operator for output.
bool isContaining(int x, int y) const
Checks the rectangle contains a point.
int width
Holds the width of the rectangle.
Rectangle intersection(Rectangle const &rh) const
Gets the intersection between two rectangles.
int y
Holds the x coordinate of the rectangle.
void setAll(int x, int y, int width, int height)
Sets the dimension of a rectangle.
Rectangle operator+(Rectangle const &rh) const
Adds a rectangle to this rectangle.
int x
Holds the x coordinate of the rectangle.
int height
Holds the height of the rectangle.
Rectangle const & operator+=(Rectangle const &rh)
Adds a rectangle to this rectangle.
bool isIntersecting(Rectangle const &rectangle) const
Checks if another rectangle intersects with the rectangle.
bool isEmpty() const
Checks whether the rectangle is empty or not.