[Libreoffice-commits] core.git: include/vcl

Chris Sherlock chris.sherlock79 at gmail.com
Tue Mar 6 04:07:47 UTC 2018


 include/vcl/bitmap.hxx |   23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

New commits:
commit 221b17794c1cb15ce7f5a0b5a543fc79eee7085f
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Thu Mar 1 05:10:26 2018 +1100

    vcl: document Bitmap::MakeMonochrome(), fix @return format
    
    Change-Id: I10b37907a3ccd5219b7d5e04177bba58d80a676b
    Reviewed-on: https://gerrit.libreoffice.org/50528
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

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!
      */


More information about the Libreoffice-commits mailing list