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