Grok 20.3.2
TileWindow.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2026 Grok Image Compression Inc.
3 *
4 * This source code is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License, version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This source code is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Affero General Public License for more details.
12 *
13 * You should have received a copy of the GNU Affero General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 */
17
18#pragma once
19
20#include <set>
21#include <cstdint>
22#include "geometry.h"
23
24namespace grk
25{
26
34{
35public:
39 TileWindow();
40
44 virtual ~TileWindow() = default;
45
50 void init(Rect16 allTiles);
51
56 void slate(Rect16 tiles);
57
62 void slate(uint16_t tile_index);
63
69 bool isSlated(uint16_t tile_index);
70
71 std::set<uint16_t>& getSlatedTiles(void);
72
74
75private:
80 void slate(Point16 tile);
81
87 uint16_t index(Point16 tile);
88
92 std::set<uint16_t> tilesSlatedForDecompression_;
93
98
104};
105
106} // namespace grk
TileWindow()
Constructs new TileWindow.
Definition TileWindow.cpp:23
void slate(Rect16 tiles)
Slates tiles inside window.
Definition TileWindow.cpp:31
Rect16 slatedTiles_
tiles slated for decompression, in Rect16 format
Definition TileWindow.h:103
bool isSlated(uint16_t tile_index)
Checks if tile at given tile index is slated.
Definition TileWindow.cpp:57
std::set< uint16_t > tilesSlatedForDecompression_
tiles slated for decompression
Definition TileWindow.h:92
Rect16 getSlatedTileRect(void)
Definition TileWindow.cpp:67
uint16_t index(Point16 tile)
Gets tile index from tile grid coordinates.
Definition TileWindow.cpp:52
std::set< uint16_t > & getSlatedTiles(void)
Definition TileWindow.cpp:62
Rect16 allTiles_
rectangular grid of all slated tiles
Definition TileWindow.h:97
virtual ~TileWindow()=default
Destroys TileWindow.
void init(Rect16 allTiles)
Initializes TileWindow.
Definition TileWindow.cpp:25
ResWindow.
Definition CompressedChunkCache.h:36
Point< uint16_t > Point16
Definition geometry.h:43
Rect< uint16_t > Rect16
Definition geometry.h:65