Public Member Functions | |
| SkylineRectanglePacker (int w, int h) | |
| ~SkylineRectanglePacker () final | |
| void | Reset () final |
| Empty out all previously added rectangles. More... | |
| bool | AddRect (int w, int h, IPoint16 *loc) final |
| Attempt to add a rect without moving already placed rectangles. More... | |
| Scalar | PercentFull () const final |
| Returns how much area has been filled with rectangles. More... | |
Public Member Functions inherited from impeller::RectanglePacker | |
| virtual | ~RectanglePacker () |
Additional Inherited Members | |
Static Public Member Functions inherited from impeller::RectanglePacker | |
| static std::shared_ptr< RectanglePacker > | Factory (int width, int height) |
| Return an empty packer with area specified by width and height. More... | |
Protected Member Functions inherited from impeller::RectanglePacker | |
| RectanglePacker (int width, int height) | |
| int | width () const |
| int | height () const |
Definition at line 19 of file rectangle_packer.cc.
|
inline |
Definition at line 21 of file rectangle_packer.cc.
References Reset().
|
inlinefinal |
Definition at line 23 of file rectangle_packer.cc.
|
finalvirtual |
Attempt to add a rect without moving already placed rectangles.
| [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. |
Implements impeller::RectanglePacker.
Definition at line 62 of file rectangle_packer.cc.
References impeller::RectanglePacker::height(), impeller::RectanglePacker::width(), impeller::IPoint16::x_, and impeller::IPoint16::y_.
|
inlinefinalvirtual |
Returns how much area has been filled with rectangles.
Implements impeller::RectanglePacker.
Definition at line 33 of file rectangle_packer.cc.
References impeller::RectanglePacker::height(), and impeller::RectanglePacker::width().
|
inlinefinalvirtual |
Empty out all previously added rectangles.
Implements impeller::RectanglePacker.
Definition at line 25 of file rectangle_packer.cc.
References impeller::RectanglePacker::width().
Referenced by SkylineRectanglePacker().