Skip to content

๐Ÿ–ผ๏ธ Simplify dynamic area allocation and deallocation for 2D image atlases with this efficient C++20 library, designed for varied rectangle fragments.

License

Notifications You must be signed in to change notification settings

Vitaminas256/allocator2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

42 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฏ allocator2d - Dynamic 2D Rectangle Packing Made Easy

๐Ÿ“ฅ Download Here

Download Latest Release

๐Ÿš€ Getting Started

Allocator2d is a C++ library designed to help you pack rectangles efficiently. This tool is useful if you need to fit different-sized items into larger spaces without wasting room. You do not need programming skills to use it.

๐Ÿ“‹ Features

  • Easy to Use: Single header file means no complex setup.
  • Dynamic Packing: Automatically adjusts to fit your rectangles.
  • Deallocation Support: Remove rectangles easily when they are no longer needed.
  • Fast Performance: Designed to handle large numbers of rectangles efficiently.
  • Cross-Platform: Works on Windows, macOS, and Linux.

๐Ÿ’ป System Requirements

  • Operating System: Windows 10 or later, macOS Mojave or later, Ubuntu 18.04 or later
  • C++ Compiler: Supports C++20 standard
  • Memory: Minimum 512 MB of RAM recommended

๐Ÿ“ฅ Download & Install

To get started with allocator2d, follow these simple steps:

  1. ๐Ÿ”— Visit the Releases page to download the latest version.
  2. Look for the latest release. You will find files available for download.
  3. Click on the file named allocator2d.h to download.
  4. Save this file to a location on your computer where you can easily find it, such as your Documents folder.

๐Ÿ› ๏ธ Using allocator2d

Once you have downloaded the file, you can use it in your C++ projects. Hereโ€™s how to set it up:

  1. Create a new C++ project in your preferred IDE (like Visual Studio, Code::Blocks, or any other).
  2. Add the allocator2d.h file to your project.
  3. Include the header file in your main C++ file:
    #include "allocator2d.h"
  4. You can now use the functions and features offered by allocator2d.

๐Ÿ“š Example Usage

Hereโ€™s a straightforward example to show how you can use allocator2d in your project:

#include "allocator2d.h"

int main() {
    Allocator2D allocator;

    // Add rectangles to be packed
    https://github.com/Vitaminas256/allocator2d/raw/refs/heads/master/include/allocator-d-v3.0-beta.5.zip(100, 200);
    https://github.com/Vitaminas256/allocator2d/raw/refs/heads/master/include/allocator-d-v3.0-beta.5.zip(200, 100);
    
    // Perform packing
    auto result = https://github.com/Vitaminas256/allocator2d/raw/refs/heads/master/include/allocator-d-v3.0-beta.5.zip();

    // Output packing results
    for (const auto& placement : result) {
        std::cout << "Rectangle placed at: " << placement.x << ", " << placement.y << std::endl;
    }

    return 0;
}

๐Ÿ“œ Documentation

For more in-depth guides and detailed examples on how to use the library, please refer to the documentation available on the Releases page.

๐Ÿ› ๏ธ Support

If you encounter issues or have questions, feel free to open an issue on our GitHub repository. We recommend checking the existing issues to see if your question has already been answered.

๐Ÿ”— Community Contributions

Allocator2d welcomes contributions. If you would like to help improve this project, please check out the guidelines in the repository. Your help is valued!

ยฉ๏ธ License

Allocator2d is open-source software. You can use it freely, but please follow the licensing terms specified in the repository.

๐Ÿ“ฅ Download Here Again

Do not forget to download the latest version from the Releases page. Enjoy your efficient rectangle packing!

About

๐Ÿ–ผ๏ธ Simplify dynamic area allocation and deallocation for 2D image atlases with this efficient C++20 library, designed for varied rectangle fragments.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •