ladybird/Userland/Applications/Maps
Jelle Raaijmakers 3c02e3ba09 Maps: Pad grid size to prevent missing tiles
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.
2023-10-03 20:25:09 +02:00
..
CMakeLists.txt Maps: Add search panel 2023-09-24 20:05:33 -06:00
main.cpp Base+Maps: Add manpage for Maps 2023-09-25 16:20:20 +01:00
MapWidget.cpp Maps: Pad grid size to prevent missing tiles 2023-10-03 20:25:09 +02:00
MapWidget.h Maps: Add search panel 2023-09-24 20:05:33 -06:00
SearchPanel.cpp Maps: Add search panel 2023-09-24 20:05:33 -06:00
SearchPanel.gml Maps: Add search panel 2023-09-24 20:05:33 -06:00
SearchPanel.h Maps: Add search panel 2023-09-24 20:05:33 -06:00
UsersMapWidget.cpp Maps: Add search panel 2023-09-24 20:05:33 -06:00
UsersMapWidget.h Maps: Add search panel 2023-09-24 20:05:33 -06:00