add bounds to map render to prevent doing extra work when rendering only pieces of the map (eg, connections)

This commit is contained in:
garak
2023-01-06 16:17:42 -05:00
committed by t
parent 37fcfba829
commit 07caad3fce
2 changed files with 10 additions and 7 deletions

View File

@@ -76,7 +76,7 @@ public:
int getHeight();
int getBorderWidth();
int getBorderHeight();
QPixmap render(bool ignoreCache, MapLayout * fromLayout = nullptr);
QPixmap render(bool ignoreCache, MapLayout *fromLayout = nullptr, QRect bounds = QRect(0, 0, -1, -1));
QPixmap renderCollision(qreal opacity, bool ignoreCache);
bool mapBlockChanged(int i, const Blockdata &cache);
bool borderBlockChanged(int i, const Blockdata &cache);