Files
Copium/CopiumEngine/ext/include/msdf-atlas-gen/rectangle-packing.h
T
Thraix 4e466a1fce Add Text rendering
- Add FreeType as dependency
- Add MsdfGen as dependency
- Add MsdfAtlasGen as dependency
2023-05-08 22:12:19 +02:00

20 lines
636 B
C++

#pragma once
#include <utility>
#include "Rectangle.h"
namespace msdf_atlas {
/// Packs the rectangle array into an atlas with fixed dimensions, returns how many didn't fit (0 on success)
template <typename RectangleType>
int packRectangles(RectangleType *rectangles, int count, int width, int height, int padding = 0);
/// Packs the rectangle array into an atlas of unknown size, returns the minimum required dimensions constrained by SizeSelector
template <class SizeSelector, typename RectangleType>
std::pair<int, int> packRectangles(RectangleType *rectangles, int count, int padding = 0);
}
#include "rectangle-packing.hpp"