5#ifndef FLUTTER_IMPELLER_TYPOGRAPHER_RECTANGLE_PACKER_H_
6#define FLUTTER_IMPELLER_TYPOGRAPHER_RECTANGLE_PACKER_H_
8#include "flutter/fml/logging.h"
16 int16_t
x()
const {
return x_; }
17 int16_t
y()
const {
return y_; }
65 int width()
const {
return width_; }
66 int height()
const {
return height_; }
Packs rectangles into a specified area without rotating them.
virtual Scalar PercentFull() const =0
Returns how much area has been filled with rectangles.
virtual void Reset()=0
Empty out all previously added rectangles.
virtual bool AddRect(int width, int height, IPoint16 *loc)=0
Attempt to add a rect without moving already placed rectangles.
RectanglePacker(int width, int height)
virtual ~RectanglePacker()
static std::shared_ptr< RectanglePacker > Factory(int width, int height)
Return an empty packer with area specified by width and height.
#define FML_DCHECK(condition)