mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
3c02e3ba09
Previously, we would divide the widget width and height by the tile size and round up, which did not result in enough tiles to cover the entire widget. Although this calculation is correct if you starting drawing tiles in the top left corner, we have an additional offset to account for. Now, we take the number of tiles that fit in the widget completely and pad it with 2 tiles to account for the partial left/right and top/bottom sides. An additional tile is added to account for the iterator translating by width / 2, which rounds down again. The resulting tile rects are always intersected with the widget dimensions, so even if we're generating more tile coordinates than strictly necessary, we're not performing the actual download or draw operations. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
main.cpp | ||
MapWidget.cpp | ||
MapWidget.h | ||
SearchPanel.cpp | ||
SearchPanel.gml | ||
SearchPanel.h | ||
UsersMapWidget.cpp | ||
UsersMapWidget.h |