2 * SPDX-FileCopyrightText: 2011 Peter Penz <peter.penz19@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0-or-later
7 #ifndef KPIXMAPMODIFIER_H
8 #define KPIXMAPMODIFIER_H
10 #include "dolphin_export.h"
15 class DOLPHIN_EXPORT KPixmapModifier
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
23 static void scale(QPixmap
&pixmap
, const QSize
&scaledSize
);
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
30 static void applyFrame(QPixmap
&icon
, const QSize
&scaledSize
);
33 * return and paint a frame round an icon
34 * @arg framesize is in device-independent pixels
35 * @return is in device-independent pixels
38 static QSize
sizeInsideFrame(const QSize
&frameSize
);