mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:57:45 +00:00
Maps: Scale cached tiles from lower and higher zoom levels
When zooming in or out, if a tile is not yet cached, Maps now also checks the lower and higher zoom levels for cached tiles and composites a preview tile that is shown until the actual tile is loaded in.
This commit is contained in:
parent
cf898f08ab
commit
0f330a4dcf
2 changed files with 65 additions and 6 deletions
|
@ -64,6 +64,11 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
enum class TileDownloadBehavior {
|
||||
DoNotDownload,
|
||||
Download,
|
||||
};
|
||||
|
||||
private:
|
||||
MapWidget(Options const&);
|
||||
|
||||
|
@ -77,7 +82,7 @@ private:
|
|||
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
|
||||
Optional<RefPtr<Gfx::Bitmap>> get_tile_image(int x, int y);
|
||||
Optional<RefPtr<Gfx::Bitmap>> get_tile_image(int x, int y, int zoom, TileDownloadBehavior);
|
||||
void process_tile_queue();
|
||||
void clear_tile_queue();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue