diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2023-01-02 19:21:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-02 20:23:10 +0000 |
commit | 5244e7cab70a3c1f567e2e3cda41bd753e5cb530 (patch) | |
tree | ae01843196645146bbc2f385983ecbe88dc0191c /include/vcl | |
parent | cc4ead451cb3b6ce6994370b3a9263756ea284d1 (diff) |
split OutputDevice::CreateMask method
to make it easier to understand, very little of the code is shared
between the nTol == 0 and the nTol != 0 cases.
Also flatten the code structure a little.
Change-Id: I601b9046a6678a5dcf2176dbfe565a9a4e7299d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144962
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/bitmap.hxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index 123b48fcd752..a732e77f3a97 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -352,6 +352,19 @@ public: @param rTransColor Color value where the bitmask should be transparent + @return the resulting bitmask. + */ + Bitmap CreateMask( const Color& rTransColor ) const; + + /** Create on-off mask from bitmap + + This method creates a bitmask from the bitmap, where every + pixel that equals rTransColor is set transparent, the rest + opaque. + + @param rTransColor + Color value where the bitmask should be transparent + @param nTol Tolerance value. Specifies the maximal difference between rTransColor and the individual pixel values, such that the @@ -359,7 +372,7 @@ public: @return the resulting bitmask. */ - Bitmap CreateMask( const Color& rTransColor, sal_uInt8 nTol = 0 ) const; + Bitmap CreateMask( const Color& rTransColor, sal_uInt8 nTol ) const; /** Create region of similar colors in a given rectangle |