File indexing completed on 2024-12-22 04:07:22
0001 /* 0002 Copyright (c) 2007 Mike Gashler <gashlerm@yahoo.com> 0003 All rights reserved. 0004 0005 Redistribution and use in source and binary forms, with or without 0006 modification, are permitted provided that the following conditions 0007 are met: 0008 0009 1. Redistributions of source code must retain the above copyright 0010 notice, this list of conditions and the following disclaimer. 0011 2. Redistributions in binary form must reproduce the above copyright 0012 notice, this list of conditions and the following disclaimer in the 0013 documentation and/or other materials provided with the distribution. 0014 0015 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 0016 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 0017 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 0018 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 0019 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 0020 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 0021 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 0022 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0023 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 0024 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0025 */ 0026 0027 #include "kpEffectHSVCommand.h" 0028 #include "imagelib/effects/kpEffectHSV.h" 0029 0030 #include <KLocalizedString> 0031 0032 //--------------------------------------------------------------------- 0033 0034 kpEffectHSVCommand::kpEffectHSVCommand (double hue, double saturation, double value, 0035 bool actOnSelection, 0036 kpCommandEnvironment *environ) 0037 : kpEffectCommandBase (i18n ("Hue, Saturation, Value"), actOnSelection, environ), 0038 m_hue (hue), m_saturation (saturation), m_value (value) 0039 { 0040 } 0041 0042 //--------------------------------------------------------------------- 0043 0044 // protected virtual [base kpEffectCommandBase] 0045 kpImage kpEffectHSVCommand::applyEffect (const kpImage &image) 0046 { 0047 return kpEffectHSV::applyEffect (image, m_hue, m_saturation, m_value); 0048 } 0049 0050 //---------------------------------------------------------------------