26 lines
422 B
C++
26 lines
422 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
struct window_curve_ix {
|
|
struct {
|
|
uint16_t width;
|
|
uint16_t height;
|
|
} window;
|
|
};
|
|
|
|
window_curve_ix pack_all(struct rect * rects, const uint32_t num_rects);
|
|
|
|
struct rect {
|
|
uint32_t char_code;
|
|
uint32_t width;
|
|
uint32_t height;
|
|
int32_t x;
|
|
int32_t y;
|
|
|
|
std::strong_ordering operator<=>(const rect& b) const
|
|
{
|
|
return (width * height) <=> (b.width * b.height);
|
|
}
|
|
};
|