Dillo v3.1.1-98-g318d1f14
|
dw::core::Shape implemtation for simple rectangles. More...
#include <types.hh>
Public Member Functions | |
Rectangle () | |
Rectangle (int x, int y, int width, int height) | |
void | draw (core::View *view, core::style::Style *style, int x, int y) |
bool | intersectsWith (Rectangle *otherRect, Rectangle *dest) |
Return whether this rectangle and otherRect intersect. | |
bool | isSubsetOf (Rectangle *otherRect) |
bool | isPointWithin (int x, int y) |
bool | isEmpty () |
Public Member Functions inherited from lout::object::Object | |
virtual | ~Object () |
The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. | |
virtual bool | equals (Object *other) |
Returns, whether two objects are equal. | |
virtual int | hashValue () |
Return a hash value for the object. | |
virtual Object * | clone () |
Return an exact copy of the object. | |
virtual void | intoStringBuffer (misc::StringBuffer *sb) |
Store a textual representation of the object in a misc::StringBuffer. | |
const char * | toString () |
Use object::Object::intoStringBuffer to return a textual representation of the object. | |
virtual size_t | sizeOf () |
Return the number of bytes, this object totally uses. | |
Public Attributes | |
int | x |
int | y |
int | width |
int | height |
dw::core::Shape implemtation for simple rectangles.
dw::core::Rectangle::Rectangle | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
|
virtual |
Implements dw::core::Shape.
Definition at line 41 of file types.cc.
References dw::core::style::StyleAttrs::color, dw::core::View::drawRectangle(), dw::core::style::Color::SHADING_NORMAL, x, and y.
Referenced by dw::Table::drawLevel().
Return whether this rectangle and otherRect intersect.
If yes, return the intersection rectangle in dest.
Definition at line 53 of file types.cc.
References height, lout::misc::max(), lout::misc::min(), width, x, and y.
Referenced by dw::Image::draw(), dw::core::Layout::draw(), dw::core::style::drawBackground(), and dw::core::Widget::intersects().
|
inline |
Definition at line 84 of file types.hh.
Referenced by dw::fltk::FltkViewBase::draw(), and dw::core::Layout::queueDraw().
|
virtual |
bool dw::core::Rectangle::isSubsetOf | ( | Rectangle * | otherRect | ) |
int dw::core::Rectangle::height |
Definition at line 75 of file types.hh.
Referenced by dw::core::Region::addRectangle(), dw::fltk::FltkViewBase::clipPoint(), dw::fltk::FltkViewBase::draw(), dw::Image::draw(), dw::oof::OOFAwareWidget::draw(), dw::oof::OOFFloatsMgr::draw(), dw::oof::OOFPositionedMgr::draw(), dw::core::Layout::draw(), dw::core::StackingContextMgr::draw(), dw::core::style::drawBackground(), dw::core::Widget::drawBox(), dw::oof::OOFAwareWidget::drawLevel(), dw::Table::drawLevel(), dw::Textblock::drawLevel(), dw::Textblock::drawLine(), dw::Image::drawRow(), dw::core::Widget::drawWidgetBox(), dw::core::Layout::expose(), dw::fltk::FltkImgbuf::getRowArea(), dw::core::Widget::intersects(), intersectsWith(), isEmpty(), isPointWithin(), isSubsetOf(), dw::fltk::FltkViewBase::manageTabToFocus(), dw::core::Layout::queueDraw(), and Rectangle().
int dw::core::Rectangle::width |
Definition at line 74 of file types.hh.
Referenced by dw::core::Region::addRectangle(), dw::fltk::FltkViewBase::clipPoint(), dw::fltk::FltkViewBase::draw(), dw::Image::draw(), dw::oof::OOFAwareWidget::draw(), dw::oof::OOFFloatsMgr::draw(), dw::oof::OOFPositionedMgr::draw(), dw::core::Layout::draw(), dw::core::StackingContextMgr::draw(), dw::core::style::drawBackground(), dw::core::Widget::drawBox(), dw::oof::OOFAwareWidget::drawLevel(), dw::Table::drawLevel(), dw::Textblock::drawLevel(), dw::Textblock::drawLine(), dw::Image::drawRow(), dw::core::Widget::drawWidgetBox(), dw::core::Layout::expose(), dw::fltk::FltkImgbuf::getRowArea(), dw::core::Widget::intersects(), intersectsWith(), isEmpty(), isPointWithin(), isSubsetOf(), dw::fltk::FltkViewBase::manageTabToFocus(), dw::core::Layout::queueDraw(), and Rectangle().
int dw::core::Rectangle::x |
Definition at line 72 of file types.hh.
Referenced by dw::core::Region::addRectangle(), dw::fltk::FltkViewBase::clipPoint(), dw::fltk::FltkViewBase::draw(), dw::Image::draw(), dw::oof::OOFAwareWidget::draw(), dw::oof::OOFFloatsMgr::draw(), dw::oof::OOFPositionedMgr::draw(), draw(), dw::core::Layout::draw(), dw::core::StackingContextMgr::draw(), dw::core::style::drawBackground(), dw::core::Widget::drawBox(), dw::oof::OOFAwareWidget::drawLevel(), dw::Table::drawLevel(), dw::Textblock::drawLevel(), dw::Textblock::drawLine(), dw::Image::drawRow(), dw::core::Widget::drawWidgetBox(), dw::core::Layout::expose(), dw::fltk::FltkImgbuf::getRowArea(), dw::core::Widget::intersects(), intersectsWith(), isPointWithin(), isSubsetOf(), dw::fltk::FltkViewBase::manageTabToFocus(), dw::core::Layout::queueDraw(), and Rectangle().
int dw::core::Rectangle::y |
Definition at line 73 of file types.hh.
Referenced by dw::core::Region::addRectangle(), dw::fltk::FltkViewBase::clipPoint(), dw::fltk::FltkViewBase::draw(), dw::Image::draw(), dw::oof::OOFAwareWidget::draw(), dw::oof::OOFFloatsMgr::draw(), dw::oof::OOFPositionedMgr::draw(), draw(), dw::core::Layout::draw(), dw::core::StackingContextMgr::draw(), dw::core::style::drawBackground(), dw::core::Widget::drawBox(), dw::oof::OOFAwareWidget::drawLevel(), dw::Table::drawLevel(), dw::Textblock::drawLevel(), dw::Textblock::drawLine(), dw::Image::drawRow(), dw::core::Widget::drawWidgetBox(), dw::core::Layout::expose(), dw::fltk::FltkImgbuf::getRowArea(), dw::core::Widget::intersects(), intersectsWith(), isPointWithin(), isSubsetOf(), dw::fltk::FltkViewBase::manageTabToFocus(), dw::core::Layout::queueDraw(), and Rectangle().