| Line |
Branch |
Decision |
Call |
Exec |
Source |
| 1 |
|
|
|
|
#include "Area.h" |
| 2 |
|
|
|
|
|
| 3 |
|
|
|
|
using namespace Chrysalis; |
| 4 |
|
|
|
|
|
| 5 |
|
|
0/7
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
|
✗ |
Area::Area(): x_(0), y_(0), width_(0), height_(0) {} |
| 6 |
|
|
|
|
|
| 7 |
|
|
|
✗ |
Area::Area(const float x, const float y, const float width, const float height) |
| 8 |
|
|
0/7
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
|
✗ |
: x_(x), y_(y), width_(width), height_(height) {} |
| 9 |
|
|
|
|
|
| 10 |
|
|
|
✗ |
const float& Area::x() const { |
| 11 |
|
|
0/3
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
|
✗ |
return x_; |
| 12 |
|
|
|
|
} |
| 13 |
|
|
|
|
|
| 14 |
|
|
|
✗ |
const float& Area::y() const { |
| 15 |
|
|
0/5
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
|
✗ |
return y_; |
| 16 |
|
|
|
|
} |
| 17 |
|
|
|
|
|
| 18 |
|
|
|
✗ |
const float& Area::width() const { |
| 19 |
|
|
0/5
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
|
✗ |
return width_; |
| 20 |
|
|
|
|
} |
| 21 |
|
|
|
|
|
| 22 |
|
|
|
✗ |
const float& Area::height() const { |
| 23 |
|
|
0/5
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
|
✗ |
return height_; |
| 24 |
|
|
|
|
} |
| 25 |
|
|
|
|
|
| 26 |
|
|
|
✗ |
void Area::scale(const float scaleFactor) { |
| 27 |
|
|
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
|
✗ |
width_ /= scaleFactor; |
| 28 |
|
|
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
|
✗ |
height_ /= scaleFactor; |
| 29 |
|
|
|
✗ |
} |
| 30 |
|
|
|
|
|
| 31 |
|
|
|
✗ |
void Area::offset(const float deltaX, const float deltaY) { |
| 32 |
|
|
0/5
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
|
✗ |
x_ -= deltaX * width(); |
| 33 |
|
|
0/7
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
|
✗ |
y_ -= deltaY * height(); |
| 34 |
|
|
|
✗ |
} |
| 35 |
|
|
|
|
|
| 36 |
|
|
|
✗ |
void Area::setSize(const float width, const float height) { |
| 37 |
|
|
0/2
✗ Call 0 not invoked.
✗ Call 1 not invoked.
|
✗ |
width_ = width; |
| 38 |
|
|
0/2
✗ Call 0 not invoked.
✗ Call 1 not invoked.
|
✗ |
height_ = height; |
| 39 |
|
|
|
✗ |
} |
| 40 |
|
|
|
|
|