diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2018-04-18 21:06:15 +1000 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-04-22 05:28:29 +0200 |
commit | 7b06fcddf8d9a0b51bf396d29487f1fd715b82d3 (patch) | |
tree | 0f113d2065facc9038a362dbc93a411cbb62fb96 /include | |
parent | 2ed7c02478968852d7d39c2c4677f2ecf3441bc7 (diff) |
vcl: ImplConvolute3() -> BitmapConvolutionMatrixFilter
Change-Id: I0203e98d29192ef098719c0a297b967710b8729a
Reviewed-on: https://gerrit.libreoffice.org/53097
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/BitmapConvolutionMatrixFilter.hxx | 38 | ||||
-rw-r--r-- | include/vcl/bitmap.hxx | 2 |
2 files changed, 38 insertions, 2 deletions
diff --git a/include/vcl/BitmapConvolutionMatrixFilter.hxx b/include/vcl/BitmapConvolutionMatrixFilter.hxx new file mode 100644 index 000000000000..d27bfffb0fcd --- /dev/null +++ b/include/vcl/BitmapConvolutionMatrixFilter.hxx @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#ifndef INCLUDED_VCL_BITMAPCONVOLUTIONMATRIXFILTER_HXX +#define INCLUDED_VCL_BITMAPCONVOLUTIONMATRIXFILTER_HXX + +#include <vcl/BitmapFilter.hxx> + +class BitmapEx; + +/** Filter image based on a 3x3 convolution matrix + */ +class VCL_DLLPUBLIC BitmapConvolutionMatrixFilter : public BitmapFilter +{ +public: + BitmapConvolutionMatrixFilter(const long* pMatrix) + : mpMatrix(pMatrix) + { + } + + ~BitmapConvolutionMatrixFilter() override { delete mpMatrix; } + + virtual BitmapEx execute(BitmapEx const& rBitmapEx) override; + +private: + const long* mpMatrix; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index 07573b1af1b0..df6d094a9886 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -658,8 +658,6 @@ public: SAL_DLLPRIVATE bool ImplDitherFloyd(); SAL_DLLPRIVATE bool ImplDitherFloyd16(); - SAL_DLLPRIVATE bool ImplConvolute3( const long* pMatrix ); - SAL_DLLPRIVATE bool ImplMedianFilter(); SAL_DLLPRIVATE bool ImplSobelGrey(); SAL_DLLPRIVATE bool ImplEmbossGrey( const BmpFilterParam* pFilterParam ); |