Files
loongoffice/include/vcl/BitmapSepiaFilter.hxx
Chris Sherlock b781a6b6b2 vcl: get rid of Bitmap{Ex}::Filter() and Animation::Filter()
Change-Id: I510d7b286df732712aa9206b0a7c7910af34c83f
Reviewed-on: https://gerrit.libreoffice.org/53206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-05-09 05:17:42 +02:00

39 lines
936 B
C++

/* -*- 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_BITMAPSEPIAFILTER_HXX
#define INCLUDED_VCL_BITMAPSEPIAFILTER_HXX
#include <vcl/BitmapFilter.hxx>
class BitmapEx;
class VCL_DLLPUBLIC BitmapSepiaFilter : public BitmapFilter
{
public:
BitmapSepiaFilter(double nSepiaPercent)
{
// clamp value to 100%
if (nSepiaPercent <= 100)
mnSepiaPercent = nSepiaPercent;
else
mnSepiaPercent = 100;
}
virtual BitmapEx execute(BitmapEx const& rBitmapEx) override;
private:
sal_uInt16 mnSepiaPercent;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */