KHtml

scaledimageplane.h
1 /*
2  Large image displaying library.
3 
4  Copyright (C) 2004,2005 Maks Orlovich ([email protected])
5  Copyright (C) 2012 Martin Sandsmark ([email protected])
6 
7  Permission is hereby granted, free of charge, to any person obtaining a copy
8  of this software and associated documentation files (the "Software"), to deal
9  in the Software without restriction, including without limitation the rights
10  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11  copies of the Software, and to permit persons to whom the Software is
12  furnished to do so, subject to the following conditions:
13 
14  The above copyright notice and this permission notice shall be included in
15  all copies or substantial portions of the Software.
16 
17  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20  AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21  AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 
24 */
25 #ifndef SCALED_IMAGE_PLANE_H
26 #define SCALED_IMAGE_PLANE_H
27 
28 #include "array2d.h"
29 #include "imageplane.h"
30 #include "rawimageplane.h"
31 #include "imagetile.h"
32 
33 namespace khtmlImLoad
34 {
35 
36 /**
37  A scaled image plane pulls data from a RawImagePlane and resizes it
38 */
40 {
41 public:
42  virtual ~ScaledImagePlane();
43 
44  void flushCache() override;
45 
46  ScaledImagePlane(unsigned int _width, unsigned int _height, RawImagePlane *_parent);
47 
48  virtual bool isUpToDate(unsigned int tileX, unsigned int tileY,
49  PixmapTile *tile) override;
50 
51  virtual void ensureUpToDate(unsigned int tileX, unsigned int tileY,
52  PixmapTile *tile) override;
53 private:
54  RawImagePlane *parent;
55  Array2D<ImageTile> tiles;
56  int m_width, m_height;
57 };
58 
59 }
60 
61 #endif
A scaled image plane pulls data from a RawImagePlane and resizes it.
virtual void ensureUpToDate(unsigned int tileX, unsigned int tileY, PixmapTile *tile) override
Ensures that the given pixmap tile is up-to-date.
Image planes represent client-side image data, and are primarily an abstraction for pushing data to t...
Definition: imageplane.h:38
virtual bool isUpToDate(unsigned int tileX, unsigned int tileY, PixmapTile *tile) override
Returns true if the given pixmap tile is up-to-date.
A raw image plane merely contains a QImage.
Definition: rawimageplane.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Oct 26 2021 22:48:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.