From 9fd53538f9ecd2c6a935be1958b9f8dafeab8740 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Tue, 2 Jul 2019 17:11:57 +0900 Subject: vcl: make it possible to select specific scaling algorithm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Default, Fast, BestQuality scaling flags are used for selecting the best sclaing algorithm for a specific task, but not all specialized sclaing algorithms have its own flag (Super, NearestNeighbor) and are just selectable using one of the above. This adds the missing flags so it's possible to select a specific algorithm. Change-Id: Ied41f27a21a4fcc799537396f9077a9c77cc1c60 Reviewed-on: https://gerrit.libreoffice.org/75759 Reviewed-by: Chris Sherlock Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- include/vcl/bitmap.hxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'include/vcl/bitmap.hxx') diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index dcc862ed7779..59c6c9ac28d6 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -39,26 +39,27 @@ enum class BmpMirrorFlags Horizontal = 0x01, Vertical = 0x02, }; + namespace o3tl { template<> struct typed_flags : is_typed_flags {}; } - enum class BmpScaleFlag { // Try to preferably use these. - Default = 1, + Default, Fast, BestQuality, -// Specific algorithms, use only if you really need to. - Interpolate, +// Specific algorithms, use only if you really need to (mainly used for tests) + NearestNeighbor, + Interpolate, // fast, integer bilinear Lanczos, BiCubic, - BiLinear + BiLinear, + Super // bilinear interpolation when supersampling and averaging when subsampling under certain scale }; - #define BMP_COL_TRANS Color( 252, 3, 251 ) enum class BmpConversion -- cgit