diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-03-21 20:31:39 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-03-26 08:18:19 +0100 |
commit | b849373b2bd2c41ab03e2fd5e3fa5e9c48b47e51 (patch) | |
tree | f7f03c37f8956b73302f4c9aab77ba0189302c82 /drawinglayer | |
parent | de746cd639513f498c93aced200ad9a80975bda5 (diff) |
vcl: add initializer_list constructor to BitmapPalette and use it
Change-Id: Ib24266e435765bd5e05193aea5cee61d7a9346b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113133
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/tools/wmfemfhelper.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx index 73b229cd9f09..588dd9ea1cc5 100644 --- a/drawinglayer/source/tools/wmfemfhelper.cxx +++ b/drawinglayer/source/tools/wmfemfhelper.cxx @@ -670,10 +670,9 @@ namespace wmfemfhelper static BitmapEx createMaskBmpEx(const Bitmap& rBitmap, const Color& rMaskColor) { const Color aWhite(COL_WHITE); - BitmapPalette aBiLevelPalette(2); - - aBiLevelPalette[0] = aWhite; - aBiLevelPalette[1] = rMaskColor; + BitmapPalette aBiLevelPalette { + aWhite, rMaskColor + }; Bitmap aMask(rBitmap.CreateMask(aWhite)); Bitmap aSolid(rBitmap.GetSizePixel(), vcl::PixelFormat::N1_BPP, &aBiLevelPalette); |