Packs rectangles into a specified area without rotating them.
More...
#include <rectangle_packer.h>
Packs rectangles into a specified area without rotating them.
Definition at line 26 of file rectangle_packer.h.
◆ ~RectanglePacker()
virtual impeller::RectanglePacker::~RectanglePacker |
( |
| ) |
|
|
inlinevirtual |
◆ RectanglePacker()
impeller::RectanglePacker::RectanglePacker |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
inlineprotected |
◆ AddRect()
virtual bool impeller::RectanglePacker::AddRect |
( |
int |
width, |
|
|
int |
height, |
|
|
IPoint16 * |
loc |
|
) |
| |
|
pure virtual |
Attempt to add a rect without moving already placed rectangles.
- Parameters
-
[in] | width | The width of the rectangle to add. |
[in] | height | The height of the rectangle to add. |
[out] | loc | If successful, will be set to the position of the upper-left corner of the rectangle. |
- Returns
- Return true on success; false on failure.
Implemented in impeller::SkylineRectanglePacker.
◆ Factory()
Return an empty packer with area specified by width and height.
Definition at line 174 of file rectangle_packer.cc.
175 {
176 return std::make_shared<SkylineRectanglePacker>(
width,
height);
177}
◆ height()
int impeller::RectanglePacker::height |
( |
| ) |
const |
|
inlineprotected |
◆ PercentFull()
virtual Scalar impeller::RectanglePacker::PercentFull |
( |
| ) |
const |
|
pure virtual |
◆ Reset()
virtual void impeller::RectanglePacker::Reset |
( |
| ) |
|
|
pure virtual |
◆ width()
int impeller::RectanglePacker::width |
( |
| ) |
const |
|
inlineprotected |
The documentation for this class was generated from the following files: