Sha256: e2a0436aac63d12ce7a0a3a6ce8a5013a9a3e7d6445f78320da6f8f9c3200930
Contents?: true
Size: 952 Bytes
Versions: 15
Compression:
Stored size: 952 Bytes
Contents
#ifndef GOSU_SRC_BLOCKALLOCATOR_HPP #define GOSU_SRC_BLOCKALLOCATOR_HPP #include <memory> #include <Gosu/Platform.hpp> namespace Gosu { class BlockAllocator { struct Impl; const GOSU_UNIQUE_PTR<Impl> pimpl; public: struct Block { unsigned left, top, width, height; Block() {} Block(unsigned aLeft, unsigned aTop, unsigned aWidth, unsigned aHeight) : left(aLeft), top(aTop), width(aWidth), height(aHeight) {} }; BlockAllocator(unsigned width, unsigned height); ~BlockAllocator(); unsigned width() const; unsigned height() const; bool alloc(unsigned width, unsigned height, Block& block); void block(unsigned left, unsigned top, unsigned width, unsigned height); void free(unsigned left, unsigned top, unsigned width, unsigned height); }; } #endif
Version data entries
15 entries across 15 versions & 1 rubygems