diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2018-03-01 05:10:26 +1100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-03-06 05:07:24 +0100 |
commit | 221b17794c1cb15ce7f5a0b5a543fc79eee7085f (patch) | |
tree | bc8568d89ad2349422406943cd165c2e2610cac9 /include/vcl | |
parent | 80c98c069b37bd2f8f67d2f6b59edc3b4c6abea5 (diff) |
vcl: document Bitmap::MakeMonochrome(), fix @return format
Change-Id: I10b37907a3ccd5219b7d5e04177bba58d80a676b
Reviewed-on: https://gerrit.libreoffice.org/50528
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/bitmap.hxx | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index cc105600094d..2549c9c05a01 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -263,18 +263,29 @@ public: public: - bool MakeMonochrome(sal_uInt8 cThreshold); - - /** Convert bitmap format @param eConversion The format this bitmap should be converted to. - @return true, if the conversion was completed successfully. + @return true the conversion was completed successfully. */ bool Convert( BmpConversion eConversion ); + + /** Convert to 2 color bitmap. + + Converts to a 2 color indexed bitmap - note that we don't change to black and white + monochrome, but we pick the closest color to black and white in the bitmap. + + @param cThreshold + Luminance value that determines whether the colour should be black (or closest + color to black) or white (or closest color to white). + + @return true conversion to monochrome bitmap was successful + */ + bool MakeMonochrome(sal_uInt8 cThreshold); + /** Reduce number of colors for the bitmap @param nNewColorCount @@ -283,7 +294,7 @@ public: @param eReduce Algorithm to use for color reduction - @return true, if the color reduction operation was completed successfully. + @return true the color reduction operation was completed successfully. */ bool ReduceColors( sal_uInt16 nNewColorCount, @@ -310,7 +321,7 @@ public: dimension, i.e. negative left,top rectangle coordinates or exceeding width or height is ignored. - @return true, if cropping was performed successfully. If + @return true cropping was performed successfully. If nothing had to be cropped, because e.g. the crop rectangle included the bitmap, false is returned, too! */ |