]> cloud.milkyroute.net Git - dolphin.git/blob - src/kitemviews/private/kpixmapmodifier.h
Output of licensedigger + manual cleanup afterwards.
[dolphin.git] / src / kitemviews / private / kpixmapmodifier.h
1 /*
2 * SPDX-FileCopyrightText: 2011 Peter Penz <peter.penz19@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #ifndef KPIXMAPMODIFIER_H
8 #define KPIXMAPMODIFIER_H
9
10 #include "dolphin_export.h"
11
12 class QPixmap;
13 class QSize;
14
15 class DOLPHIN_EXPORT KPixmapModifier
16 {
17 public:
18 /**
19 * Scale a pixmap to a given size.
20 * @arg scaledSize is assumed to be the scaled to the same device pixel ratio as the source pixmap
21 * @arg scaledSize is in device pixels
22 */
23 static void scale(QPixmap& pixmap, const QSize& scaledSize);
24
25 /**
26 * Resize and paint a frame round an icon
27 * @arg scaledSize is in device-independent pixels
28 * The returned image will be scaled by the application devicePixelRatio
29 */
30 static void applyFrame(QPixmap& icon, const QSize& scaledSize);
31
32 /**
33 * return and paint a frame round an icon
34 * @arg framesize is in device-independent pixels
35 * @return is in device-independent pixels
36 */
37
38 static QSize sizeInsideFrame(const QSize& frameSize);
39 };
40
41 #endif
42
43