marble
#include <StackedTile.h>
Public Member Functions | |
StackedTile (TileId const &id, QImage const &resultImage, QVector< QSharedPointer< TextureTile > > const &tiles) | |
virtual | ~StackedTile () |
int | byteCount () const |
int | depth () const |
uint | pixel (int x, int y) const |
uint | pixelF (qreal x, qreal y) const |
uint | pixelF (qreal x, qreal y, const QRgb &pixel) const |
QImage const * | resultImage () const |
void | setUsed (bool used) |
QVector< QSharedPointer < TextureTile > > | tiles () const |
bool | used () const |
Public Member Functions inherited from Marble::Tile | |
Tile (TileId const &tileId) | |
virtual | ~Tile () |
TileId const & | id () const |
Detailed Description
A single tile that consists of a stack of Tile layers.
The StackedTile is a tile container that covers a certain area and is used for a particular zoom level. It consists of a stack of several individual thematic Tiles that cover the very same area and are used for the very same zoom level: This stack of Tiles is built up from the ground: The first Tile at the bottom usually represents the ground surface. Optionally there might be a range of other Tiles stacked on top which cover e.g. relief, streets and clouds.
For rendering the whole stack of tiles gets merged and blended into a single QImage. This merging/blending operation is usually only performed once the stack of tiles changes visually. As a result access to the visual composition of all TextureTile layers is very fast since it is reduced to a single QImage that also consumes very little memory.
The whole mechanism is comparable to layers in applications like Gimp or Photoshop (TM) which can be blended on top of each other via so called filters and can be merged into a single layer if required.
Restrictions: The Tiles that are part of the stack need to be of the same size and need to cover the same area at the same zoom level using the very same projection.
Definition at line 56 of file StackedTile.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 59 of file StackedTile.cpp.
|
virtual |
Definition at line 77 of file StackedTile.cpp.
Member Function Documentation
int StackedTile::byteCount | ( | ) | const |
Definition at line 252 of file StackedTile.cpp.
int StackedTile::depth | ( | ) | const |
Definition at line 247 of file StackedTile.cpp.
uint StackedTile::pixel | ( | int | x, |
int | y | ||
) | const |
Returns the color value of the result tile at the given integer position.
- Returns
- The uint that describes the color value of the given pixel
Note: for gray scale images the color value of a single pixel is described via a uchar (1 byte) while for RGB(A) images uint (4 bytes) are used.
Definition at line 83 of file StackedTile.cpp.
uint StackedTile::pixelF | ( | qreal | x, |
qreal | y | ||
) | const |
Returns the color value of the result tile at a given floating point position.
- Returns
- The uint that describes the color value of the given pixel
Subpixel calculation is done via bilinear interpolation.
Note: for gray scale images the color value of a single pixel is described via a uchar (1 byte) while for RGB(A) images uint (4 bytes) are used.
Definition at line 237 of file StackedTile.cpp.
uint StackedTile::pixelF | ( | qreal | x, |
qreal | y, | ||
const QRgb & | pixel | ||
) | const |
Definition at line 100 of file StackedTile.cpp.
QImage const * StackedTile::resultImage | ( | ) | const |
Returns the QImage that describes the merged stack of Tiles.
- Returns
- A non-zero pointer to the resulting QImage
Definition at line 262 of file StackedTile.cpp.
void StackedTile::setUsed | ( | bool | used | ) |
Definition at line 227 of file StackedTile.cpp.
QVector< QSharedPointer< TextureTile > > StackedTile::tiles | ( | ) | const |
Returns the stack of Tiles.
- Returns
- A container of Tile objects.
Definition at line 257 of file StackedTile.cpp.
bool StackedTile::used | ( | ) | const |
Definition at line 232 of file StackedTile.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:46 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.