|
FifeGUI 0.2.0
A C++ GUI library designed for games.
|
#include <cliprectangle.hpp>
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 |
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.
| fcn::ClipRectangle::ClipRectangle | ( | int | x, |
| int | y, | ||
| int | width, | ||
| int | height, | ||
| int | xOffset, | ||
| int | yOffset ) |
Constructor.
| x | The rectangle x coordinate. |
| y | The rectangle y coordinate. |
| width | The rectangle width. |
| height | The rectangle height. |
| xOffset | The offset of the x coordinate. Used to for calculating the actual screen coordinate from the relative screen coordinate. |
| yOffset | The 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.
| ClipRectangle & fcn::ClipRectangle::operator= | ( | Rectangle const & | other | ) |
Copy constructor.
Copies x, y, width and height field from a rectangle to a clip rectangle.
| other | The rectangle to copy data from. |
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.
| int fcn::ClipRectangle::xOffset {0} |
Holds the x offset of the x coordinate.
Definition at line 55 of file cliprectangle.hpp.
Referenced by ClipRectangle(), fcn::sdl2::Graphics::drawCircle(), fcn::sdl2::Graphics::drawCircleSegment(), fcn::sdl2::Graphics::drawFillCircle(), fcn::sdl2::Graphics::drawFillCircleSegment(), fcn::sdl2::Graphics::drawHorizontalLine(), fcn::opengl::Graphics::drawImage(), fcn::sdl2::Graphics::drawImage(), fcn::opengl::Graphics::drawLine(), fcn::sdl2::Graphics::drawLine(), fcn::sdl2::Graphics::drawLine(), fcn::opengl::Graphics::drawPoint(), fcn::sdl2::Graphics::drawPoint(), fcn::opengl::Graphics::drawRectangle(), fcn::sdl2::Graphics::drawRoundStroke(), fcn::sdl2::Graphics::drawSDLTexture(), fcn::sdl2::Graphics::drawVerticalLine(), fcn::opengl::Graphics::fillRectangle(), fcn::sdl2::Graphics::fillRectangle(), and fcn::Graphics::pushClipArea().
| int fcn::ClipRectangle::yOffset {0} |
Holds the y offset of the y coordinate.
Definition at line 60 of file cliprectangle.hpp.
Referenced by ClipRectangle(), fcn::sdl2::Graphics::drawCircle(), fcn::sdl2::Graphics::drawCircleSegment(), fcn::sdl2::Graphics::drawFillCircle(), fcn::sdl2::Graphics::drawFillCircleSegment(), fcn::sdl2::Graphics::drawHorizontalLine(), fcn::opengl::Graphics::drawImage(), fcn::sdl2::Graphics::drawImage(), fcn::opengl::Graphics::drawLine(), fcn::sdl2::Graphics::drawLine(), fcn::sdl2::Graphics::drawLine(), fcn::opengl::Graphics::drawPoint(), fcn::sdl2::Graphics::drawPoint(), fcn::opengl::Graphics::drawRectangle(), fcn::sdl2::Graphics::drawRoundStroke(), fcn::sdl2::Graphics::drawSDLTexture(), fcn::sdl2::Graphics::drawVerticalLine(), fcn::opengl::Graphics::fillRectangle(), fcn::sdl2::Graphics::fillRectangle(), and fcn::Graphics::pushClipArea().