KHtml

rawimageplane.cpp
1 /*
2  Large image displaying library.
3 
4  Copyright (C) 2004,2005 Maks Orlovich ([email protected])
5 
6  Permission is hereby granted, free of charge, to any person obtaining a copy
7  of this software and associated documentation files (the "Software"), to deal
8  in the Software without restriction, including without limitation the rights
9  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  copies of the Software, and to permit persons to whom the Software is
11  furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20  AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 
23 */
24 #include "rawimageplane.h"
25 
26 namespace khtmlImLoad
27 {
28 
29 bool RawImagePlane::isUpToDate(unsigned int tileX, unsigned int tileY,
30  PixmapTile *tile)
31 {
32  Q_UNUSED(tileX);
33  return checkUpToDate(versions + tileY * Tile::TileSize, tile);
34 }
35 
36 void RawImagePlane::ensureUpToDate(unsigned int tileX, unsigned int tileY,
37  PixmapTile *tile)
38 {
39  //Just image -> pixmap update
40  updatePixmap(tile, image,
41  tileX, tileY,
42  tileX * Tile::TileSize, tileY * Tile::TileSize,
43  versions + tileY * Tile::TileSize);
44 }
45 
46 }
47 
virtual void ensureUpToDate(unsigned int tileX, unsigned int tileY, PixmapTile *tile) override
Ensures that the given pixmap tile is up-to-date.
virtual bool isUpToDate(unsigned int tileX, unsigned int tileY, PixmapTile *tile) override
Returns true if the given pixmap tile is up-to-date.
void updatePixmap(PixmapTile *tile, const QImage &image, unsigned int tileX, unsigned int tileY, unsigned int offX, unsigned int offY, unsigned char *versions)
Update the pixmap using the appropriate image, starting from offset (offX, offY), and the matching ve...
Definition: imageplane.cpp:52
bool checkUpToDate(const unsigned char *versions, PixmapTile *tile)
Checks whether the tile is up-to-date for a given version array.
Definition: imageplane.cpp:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 25 2021 22:48:19 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.