summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-01-11 20:17:58 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-12 06:54:30 +0000
commit53603317af854a352e75fd2c5f0f0eeaacc5293c (patch)
tree7eeadadf0043ad681d19272f042c0d9968eef291 /include
parent244803ee2bcdfd4c4244f0c8a0654dab25fbc34d (diff)
vcl: introduce a BitmapEx::DumpAsPng()
This is mostly useful for ad-hoc debugging, so you don't need to manually create an SvFileStream, a vcl::PngImageWriter & connect them, but you can step through code in the debugger and call DumpAsPng() at random code locations. The filename type is intentionally a 'const char*', so you can call DumpAsPng(0) from gdb; that would not be possible for a 'const OUString&' parameter type. Change-Id: I7e6c9bfe8410892969a1cbd1f827e2d62f409400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145361 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/bitmapex.hxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index 45f54d016a74..5838ef8d6e40 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -449,6 +449,8 @@ public:
SAL_DLLPRIVATE std::shared_ptr<SalBitmap> const & ImplGetBitmapSalBitmap() const { return maBitmap.ImplGetSalBitmap(); }
+ /// Dumps the pixels as PNG in bitmap.png.
+ void DumpAsPng(const char* pFileName = nullptr) const;
private:
friend class ImpGraphic;