X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/e1789b559eb63ee517e73968eee72ad8837e7a6f..1b6ee5d6cd918b81c59a5163c9d6371f35f9885c:/src/kitemviews/private/kpixmapmodifier.h diff --git a/src/kitemviews/private/kpixmapmodifier.h b/src/kitemviews/private/kpixmapmodifier.h index b5eec6542..e48abf515 100644 --- a/src/kitemviews/private/kpixmapmodifier.h +++ b/src/kitemviews/private/kpixmapmodifier.h @@ -20,16 +20,34 @@ #ifndef KPIXMAPMODIFIER_H #define KPIXMAPMODIFIER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" class QPixmap; class QSize; -class LIBDOLPHINPRIVATE_EXPORT KPixmapModifier +class DOLPHIN_EXPORT KPixmapModifier { public: + /** + * Scale a pixmap to a given size. + * @arg scaledSize is assumed to be the scaled to the same device pixel ratio as the source pixmap + * @arg scaledSize is in device pixels + */ static void scale(QPixmap& pixmap, const QSize& scaledSize); + + /** + * Resize and paint a frame round an icon + * @arg scaledSize is in device-independent pixels + * The returned image will be scaled by the application devicePixelRatio + */ static void applyFrame(QPixmap& icon, const QSize& scaledSize); + + /** + * return and paint a frame round an icon + * @arg framesize is in device-independent pixels + * @return is in device-indepent pixels + */ + static QSize sizeInsideFrame(const QSize& frameSize); };