dillo  3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
  Fossies Dox: dillo-3.0.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

dw::core::Rectangle Class Reference

dw::core::Shape implemtation for simple rectangles. More...

#include <types.hh>

Inheritance diagram for dw::core::Rectangle:
Collaboration diagram for dw::core::Rectangle:

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)
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. More...
virtual bool equals (Object *other)
 Returns, whether two objects are equal. More...
virtual int hashValue ()
 Return a hash value for the object. More...
virtual Objectclone ()
 Return an exact copy of the object. More...
virtual void intoStringBuffer (misc::StringBuffer *sb)
 Store a textual representation of the object in a misc::StringBuffer. More...
const char * toString ()
 Use object::Object::intoStringBuffer to return a textual representation of the object. More...
virtual size_t sizeOf ()
 Return the number of bytes, this object totally uses. More...

Public Attributes

int x
int y
int width
int height

Detailed Description

dw::core::Shape implemtation for simple rectangles.

Definition at line 69 of file types.hh.

Constructor & Destructor Documentation

◆ Rectangle() [1/2]

dw::core::Rectangle::Rectangle ( )

Definition at line 77 of file types.hh.

◆ Rectangle() [2/2]

dw::core::Rectangle::Rectangle ( int  x,
int  y,
int  width,
int  height 

Definition at line 30 of file types.cc.

Member Function Documentation

◆ draw()

void dw::core::Rectangle::draw ( core::View view,
core::style::Style style,
int  x,
int  y 

Implements dw::core::Shape.

Definition at line 41 of file types.cc.

References dw::core::style::StyleAttrs::color, and dw::core::View::drawRectangle().

Referenced by dw::Table::draw().

◆ intersectsWith()

bool dw::core::Rectangle::intersectsWith ( Rectangle otherRect,
Rectangle dest 

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().

◆ isEmpty()

bool dw::core::Rectangle::isEmpty ( )

Definition at line 84 of file types.hh.

References height, and width.

Referenced by dw::fltk::FltkViewBase::draw(), and dw::core::Layout::queueDraw().

◆ isPointWithin()

bool dw::core::Rectangle::isPointWithin ( int  x,
int  y 

Implements dw::core::Shape.

Definition at line 87 of file types.cc.

◆ isSubsetOf()

bool dw::core::Rectangle::isSubsetOf ( Rectangle otherRect)

Definition at line 78 of file types.cc.

References height, width, x, and y.

Member Data Documentation

◆ height

◆ width

◆ x

◆ y

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