Simple example of tc::sdk::rectangle.
Simple example of tc::sdk::rectangle
#include <teiacare/sdk/geometry/rectangle.hpp>
#include <spdlog/spdlog.h>
int main()
{
spdlog::set_pattern("[%H:%M:%S.%e] %v");
spdlog::set_level(spdlog::level::trace);
int width = 4;
int height = 4;
spdlog::info("{}", r1.to_string());
spdlog::info("top_left: {}", r1.top_left().to_string());
spdlog::info("top_right: {}", r1.top_right().to_string());
spdlog::info("bottom_left: {}", r1.bottom_left().to_string());
spdlog::info("bottom_right: {}", r1.bottom_right().to_string());
spdlog::info("size: {}", r1.size().to_string());
r1.set_position(new_position);
spdlog::info("new_position: {} = {}", new_position.to_string(), r1.to_string());
r1.translate(1, 2);
spdlog::info("translate: {},{} = {}", 1, 2, r1.to_string());
return 0;
}
Thread safe, blocking queue.