Canvas scale over network

This commit is contained in:
Yousef Khadadeh 2025-09-30 16:36:09 +03:00
parent 094fce776f
commit 2f758cf4e2
13 changed files with 125 additions and 36 deletions

View file

@ -5,6 +5,10 @@
#include "MainProgram.hpp"
#include <algorithm>
void Bookmark::scale_up(const WorldScalar& scaleUpAmount) {
coords.scale_about(WorldVec{0, 0}, scaleUpAmount, true);
}
BookmarkManager::BookmarkManager(World& w):
world(w)
{}
@ -63,5 +67,5 @@ const std::unordered_map<std::string, Bookmark>& BookmarkManager::bookmark_list(
void BookmarkManager::scale_up(const WorldScalar& scaleUpAmount) {
for(auto& [n, b] : bookmarks)
b.coords.scale_about(WorldVec{0, 0}, scaleUpAmount, true);
b.scale_up(scaleUpAmount);
}