FifeGUI 0.2.0
A C++ GUI library designed for games.
fcn::ClipRectangle Class Reference

#include <cliprectangle.hpp>

Inheritance diagram for fcn::ClipRectangle:
fcn::Rectangle

Public Member Functions

 ClipRectangle (int x, int y, int width, int height, int xOffset, int yOffset)
ClipRectangle & operator= (Rectangle const &other)
Public Member Functions inherited from fcn::Rectangle
Rectangle intersection (Rectangle const &rh) const
bool isContaining (int x, int y) const
bool isContaining (Rectangle const &other) const
bool isEmpty () const
bool isIntersecting (Rectangle const &rectangle) const
Rectangle operator+ (Rectangle const &rh) const
Rectangle const & operator+= (Rectangle const &rh)
 Rectangle ()
 Rectangle (int x, int y, int width, int height)
void setAll (int x, int y, int width, int height)

Public Attributes

int xOffset {0}
int yOffset {0}
Public Attributes inherited from fcn::Rectangle
int height
int width
int x
int y

Detailed Description

A rectangle specifically used for clipping rendering regions.

A clip rectangle is a regular rectangle extended with variables for x offsets and y offsets. The offsets are used for calculations from relative screen coordinates to actual screen coordinates.

Definition at line 22 of file cliprectangle.hpp.

Constructor & Destructor Documentation

◆ ClipRectangle()

fcn::ClipRectangle::ClipRectangle ( int x,
int y,
int width,
int height,
int xOffset,
int yOffset )

Constructor.

Parameters
xThe rectangle x coordinate.
yThe rectangle y coordinate.
widthThe rectangle width.
heightThe rectangle height.
xOffsetThe offset of the x coordinate. Used to for calculating the actual screen coordinate from the relative screen coordinate.
yOffsetThe offset of the y coordinate. Used to for calculating the actual screen coordinate from the relative screen coordinate.

Definition at line 11 of file cliprectangle.cpp.

References fcn::Rectangle::height, fcn::Rectangle::Rectangle(), fcn::Rectangle::width, fcn::Rectangle::x, xOffset, fcn::Rectangle::y, and yOffset.

Member Function Documentation

◆ operator=()

ClipRectangle & fcn::ClipRectangle::operator= ( Rectangle const & other)

Copy constructor.

Copies x, y, width and height field from a rectangle to a clip rectangle.

Parameters
otherThe rectangle to copy data from.
Returns
A clip rectangle with data copied from a rectangle.

Definition at line 16 of file cliprectangle.cpp.

References fcn::Rectangle::height, fcn::Rectangle::Rectangle(), fcn::Rectangle::width, fcn::Rectangle::x, and fcn::Rectangle::y.

Member Data Documentation

◆ xOffset

◆ yOffset


The documentation for this class was generated from the following files: