diff options
| author | David Edmundson <[email protected]> | 2015-03-30 13:39:17 +0200 |
|---|---|---|
| committer | David Edmundson <[email protected]> | 2015-03-30 13:39:17 +0200 |
| commit | 4ed0b82b02aa787ba25bdc5a5e5a99037fdb6efa (patch) | |
| tree | dac01c877cd1b93a721ff7a7e5873fb173eb58b0 /src/kitemviews/private/kpixmapmodifier.h | |
| parent | fba5dd58a55e191a3368cc85735826c2b9e18a8b (diff) | |
| parent | 1b6ee5d6cd918b81c59a5163c9d6371f35f9885c (diff) | |
Merge branch 'davidedmundson/highdpi'
REVIEW: 123137
Diffstat (limited to 'src/kitemviews/private/kpixmapmodifier.h')
| -rw-r--r-- | src/kitemviews/private/kpixmapmodifier.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/kitemviews/private/kpixmapmodifier.h b/src/kitemviews/private/kpixmapmodifier.h index e8ca11ac1..e48abf515 100644 --- a/src/kitemviews/private/kpixmapmodifier.h +++ b/src/kitemviews/private/kpixmapmodifier.h @@ -28,8 +28,26 @@ class QSize; 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); }; |
