#include <rectangle.h>


Public Member Functions | |
| Rectangle () | |
| Constructs a Rectangle w/o initializing it. | |
| virtual | ~Rectangle () |
| Rectangle (BoundingBox &b) | |
| Constructs a rectangle from another one. | |
| bool | IsInside (int x, int y) const |
| Tests if a point (x, y) falls inside this rectangle. | |
| virtual SHAPE_TYPE | GetType () const |
| Returns the type of the Shape. | |
| virtual const std::string & | GetName () const |
| Returns the name of the Shape. | |
| double | SumValues (Image *pImage) |
| Computes the sum of all pixels' values withing the rectangle. | |
| double | GetSurface () const |
| Computes the area of the rectangle. | |
| virtual void | Draw (QPainter *p, int fact) |
| Draw the rectangle in the image. | |
Definition at line 19 of file rectangle.h.
| Rectangle::Rectangle | ( | ) |
| Rectangle::~Rectangle | ( | ) | [virtual] |
Definition at line 20 of file rectangle.cpp.
| Rectangle::Rectangle | ( | BoundingBox & | b | ) |
Constructs a rectangle from another one.
| b | BoundingBox from which to create this rectangle |
Definition at line 15 of file rectangle.cpp.
References Shape::m_box.
| bool Rectangle::IsInside | ( | int | x, | |
| int | y | |||
| ) | const [virtual] |
Tests if a point (x, y) falls inside this rectangle.
| x,y | :point to be tested |
Implements Shape.
Definition at line 57 of file rectangle.cpp.
References BoundingBox::IsInside(), and Shape::m_box.

| SHAPE_TYPE Rectangle::GetType | ( | ) | const [virtual] |
Returns the type of the Shape.
Implements Shape.
Definition at line 24 of file rectangle.cpp.
References RECTANGLE.
| const std::string & Rectangle::GetName | ( | ) | const [virtual] |
| double Rectangle::SumValues | ( | Image * | pImage | ) | [virtual] |
Computes the sum of all pixels' values withing the rectangle.
| pImage | : pointer to the data |
Implements Shape.
Definition at line 41 of file rectangle.cpp.
References Image::GetData(), BoundingBox::GetEndX(), BoundingBox::GetEndY(), BoundingBox::GetOriginX(), BoundingBox::GetOriginY(), and Shape::m_box.

| double Rectangle::GetSurface | ( | ) | const [virtual] |
Computes the area of the rectangle.
Implements Shape.
Definition at line 52 of file rectangle.cpp.
References Shape::GetHeight(), and Shape::GetWidth().

| void Rectangle::Draw | ( | QPainter * | p, | |
| int | fact | |||
| ) | [virtual] |
Draw the rectangle in the image.
| p | : low-level Qt object allowing to draw and/or display a pixmap in a QWidget | |
| fact | : ratio between the data scale (shapes to be drawn) and the visualization scale (graphical representation) |
Implements Shape.
Definition at line 33 of file rectangle.cpp.
References BoundingBox::GetHeight(), BoundingBox::GetOriginX(), BoundingBox::GetOriginY(), BoundingBox::GetWidth(), and Shape::m_box.

1.5.6