summaryrefslogtreecommitdiff
path: root/include/svtools/imagemgr.hxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-04-12 11:11:13 +0900
committerTomaž Vajngerl <quikee@gmail.com>2019-04-12 13:56:53 +0200
commit812f0a83d223cddf00b121db40ca7ff91c22ccfa (patch)
tree8137fdfbac1f3c50bcd5b55ef66cd036aef0e455 /include/svtools/imagemgr.hxx
parented437865a0db175e45ff421d50f429dff421d0cf (diff)
internally resize image instead of scaling bitmaps outside
When we want a different size Image, we can now set that as a parameter at construction of the Image. Previously we needed to create an Image, forcefully take the bitmap out, resize the bitmap and create a new Image out of that. Doing it internally gives us the benefit to have a more control over the scaling process, especially when dealing with HiDPI images. Change-Id: I104118f4d863d519cc7aad1a17ca0289c01ed9ff Reviewed-on: https://gerrit.libreoffice.org/70617 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/svtools/imagemgr.hxx')
-rw-r--r--include/svtools/imagemgr.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/svtools/imagemgr.hxx b/include/svtools/imagemgr.hxx
index 45212829b5c6..697ab8aeb41c 100644
--- a/include/svtools/imagemgr.hxx
+++ b/include/svtools/imagemgr.hxx
@@ -22,6 +22,7 @@
#include <rtl/ustring.hxx>
#include <svtools/svtdllapi.h>
+#include <tools/gen.hxx>
enum class SvImageId {
NONE = 0,
@@ -119,10 +120,10 @@ private:
public:
SVT_DLLPUBLIC static OUString GetImageId( const INetURLObject& rURL, bool bBig = false );
- SVT_DLLPUBLIC static Image GetImage( const INetURLObject& rURL, bool bBig = false );
+ SVT_DLLPUBLIC static Image GetImage( const INetURLObject& rURL, bool bBig = false, Size const & rPreferredSize = Size());
SVT_DLLPUBLIC static OUString GetFileImageId( const INetURLObject& rURL );
SVT_DLLPUBLIC static Image GetFileImage( const INetURLObject& rURL );
- SVT_DLLPUBLIC static Image GetImageNoDefault( const INetURLObject& rURL, bool bBig = false );
+ SVT_DLLPUBLIC static Image GetImageNoDefault(const INetURLObject& rURL, bool bBig = false, Size const & rPreferredSize = Size());
SVT_DLLPUBLIC static Image GetFolderImage( const svtools::VolumeInfo& rInfo );
SVT_DLLPUBLIC static OUString GetDescription( const INetURLObject& rObject );