____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"#include <rectangle.h>

Public Member Functions | |
| Rectangle () | |
| Rectangle (int x, int y, int width, int height) | |
| void | setAll (int x, int y, int width, int height) |
| bool | intersect (const Rectangle &rectangle) |
| bool | isPointInRect (int x, int y) const |
Public Attributes | |
| int | x |
| int | y |
| int | width |
| int | height |
Definition at line 65 of file rectangle.h.
| gcn::Rectangle::Rectangle | ( | ) |
| gcn::Rectangle::Rectangle | ( | int | x, | |
| int | y, | |||
| int | width, | |||
| int | height | |||
| ) |
| void gcn::Rectangle::setAll | ( | int | x, | |
| int | y, | |||
| int | width, | |||
| int | height | |||
| ) |
| bool gcn::Rectangle::intersect | ( | const Rectangle & | rectangle | ) |
Checks if another Rectangle intersects with the Rectangle.
| rectangle | another Rectangle. |
Definition at line 87 of file rectangle.cpp.
References height, width, x, and y.
Referenced by MyOpenGLGraphics::drawRectangle(), MyOpenGLGraphics::fillRectangle(), gcn::SDLGraphics::fillRectangle(), and gcn::Graphics::pushClipArea().
| bool gcn::Rectangle::isPointInRect | ( | int | x, | |
| int | y | |||
| ) | const |
Checks if a point is inside the Rectangle.
| x | the point x coordinate | |
| y | the point y coordinate |
Definition at line 128 of file rectangle.cpp.
Referenced by gcn::SDLGraphics::drawLine(), gcn::SDLGraphics::drawPoint(), and gcn::Gui::logic().
Definition at line 109 of file rectangle.h.
Referenced by gcn::SDLGraphics::_beginDraw(), gcn::ClipRectangle::ClipRectangle(), gcn::Window::draw(), gcn::ScrollArea::draw(), gcn::Gui::draw(), gcn::Container::drawChildren(), gcn::SDLGraphics::drawHLine(), MyOpenGLGraphics::drawImage(), MyOpenGLGraphics::drawRectangle(), gcn::SDLGraphics::drawRectangle(), CFont::drawString(), gcn::SDLGraphics::drawVLine(), MyOpenGLGraphics::fillRectangle(), gcn::SDLGraphics::fillRectangle(), gcn::Widget::getAbsolutePosition(), gcn::Container::getDrawSize(), gcn::ScrollArea::getHorizontalMarkerDimension(), gcn::ScrollArea::getVerticalMarkerDimension(), gcn::Widget::getX(), intersect(), gcn::ScrollArea::mouseMotion(), gcn::ScrollArea::mousePress(), gcn::ClipRectangle::operator=(), gcn::SDLGraphics::popClipArea(), gcn::SDLGraphics::pushClipArea(), gcn::Graphics::pushClipArea(), Rectangle(), gcn::Window::repositionContent(), gcn::TextBox::scrollToCaret(), gcn::ScrollArea::scrollToRectangle(), gcn::Widget::setPosition(), and gcn::Widget::setX().
Definition at line 110 of file rectangle.h.
Referenced by gcn::SDLGraphics::_beginDraw(), gcn::ClipRectangle::ClipRectangle(), gcn::Window::draw(), gcn::ScrollArea::draw(), gcn::Gui::draw(), gcn::Container::drawChildren(), gcn::SDLGraphics::drawHLine(), MyOpenGLGraphics::drawImage(), MyOpenGLGraphics::drawRectangle(), gcn::SDLGraphics::drawRectangle(), CFont::drawString(), gcn::SDLGraphics::drawVLine(), MyOpenGLGraphics::fillRectangle(), gcn::SDLGraphics::fillRectangle(), gcn::Widget::getAbsolutePosition(), gcn::Container::getDrawSize(), gcn::ScrollArea::getHorizontalMarkerDimension(), gcn::ScrollArea::getVerticalMarkerDimension(), gcn::Widget::getY(), intersect(), gcn::ScrollArea::logic(), gcn::ScrollArea::mouseMotion(), gcn::ScrollArea::mousePress(), gcn::ClipRectangle::operator=(), gcn::SDLGraphics::popClipArea(), gcn::SDLGraphics::pushClipArea(), gcn::Graphics::pushClipArea(), Rectangle(), gcn::Window::repositionContent(), gcn::TextBox::scrollToCaret(), gcn::ScrollArea::scrollToRectangle(), gcn::Widget::setPosition(), gcn::ListBox::setSelected(), and gcn::Widget::setY().
Definition at line 111 of file rectangle.h.
Referenced by gcn::SDLGraphics::_beginDraw(), gcn::ClipRectangle::ClipRectangle(), gcn::Window::draw(), gcn::ScrollArea::draw(), gcn::Gui::draw(), gcn::Container::drawChildren(), gcn::ScrollArea::drawDownButton(), gcn::ImageFont::drawGlyph(), gcn::ScrollArea::drawHBar(), gcn::SDLGraphics::drawHLine(), gcn::ScrollArea::drawHMarker(), MyOpenGLGraphics::drawImage(), gcn::ScrollArea::drawLeftButton(), MyOpenGLGraphics::drawRectangle(), gcn::SDLGraphics::drawRectangle(), gcn::ScrollArea::drawRightButton(), CFont::drawString(), gcn::ScrollArea::drawUpButton(), gcn::ScrollArea::drawVBar(), gcn::SDLGraphics::drawVLine(), gcn::ScrollArea::drawVMarker(), MyOpenGLGraphics::fillRectangle(), gcn::SDLGraphics::fillRectangle(), gcn::Window::getDrawSize(), gcn::ScrollArea::getDrawSize(), gcn::Container::getDrawSize(), gcn::ScrollArea::getHorizontalMarkerDimension(), gcn::ScrollArea::getHorizontalMaxScroll(), gcn::Widget::getWidth(), gcn::ImageFont::getWidth(), intersect(), isPointInRect(), gcn::ScrollArea::mouseMotion(), gcn::ClipRectangle::operator=(), gcn::SDLGraphics::popClipArea(), gcn::SDLGraphics::pushClipArea(), gcn::Graphics::pushClipArea(), Rectangle(), gcn::TextBox::scrollToCaret(), gcn::ScrollArea::scrollToRectangle(), and gcn::Widget::setWidth().
Definition at line 112 of file rectangle.h.
Referenced by gcn::SDLGraphics::_beginDraw(), gcn::ClipRectangle::ClipRectangle(), gcn::Window::draw(), gcn::ScrollArea::draw(), gcn::Gui::draw(), gcn::Container::drawChildren(), gcn::ScrollArea::drawDownButton(), gcn::ScrollArea::drawHBar(), gcn::SDLGraphics::drawHLine(), gcn::ScrollArea::drawHMarker(), MyOpenGLGraphics::drawImage(), gcn::ScrollArea::drawLeftButton(), MyOpenGLGraphics::drawRectangle(), gcn::SDLGraphics::drawRectangle(), gcn::ScrollArea::drawRightButton(), CFont::drawString(), gcn::ScrollArea::drawUpButton(), gcn::ScrollArea::drawVBar(), gcn::SDLGraphics::drawVLine(), gcn::ScrollArea::drawVMarker(), MyOpenGLGraphics::fillRectangle(), gcn::SDLGraphics::fillRectangle(), gcn::Window::getDrawSize(), gcn::ScrollArea::getDrawSize(), gcn::Container::getDrawSize(), gcn::Widget::getHeight(), gcn::ScrollArea::getVerticalMarkerDimension(), gcn::ScrollArea::getVerticalMaxScroll(), intersect(), isPointInRect(), gcn::ScrollArea::mouseMotion(), gcn::ClipRectangle::operator=(), gcn::SDLGraphics::popClipArea(), gcn::SDLGraphics::pushClipArea(), gcn::Graphics::pushClipArea(), Rectangle(), gcn::TextBox::scrollToCaret(), gcn::ScrollArea::scrollToRectangle(), gcn::Widget::setHeight(), and gcn::ListBox::setSelected().
1.5.6