/* * Copyright (C) 2007 Authors: * Christopher Brown * Ted Gould * * Released under GNU GPL, read the file 'COPYING' for more information */ #include "extension/effect.h" #include "extension/system.h" #include "modulate.h" namespace Inkscape { namespace Extension { namespace Internal { namespace Bitmap { void Modulate::applyEffect(Magick::Image* image) { float hue = (_hue + 180.0) / 180.0; image->modulate(_brightness, _saturation, hue); } void Modulate::refreshParameters(Inkscape::Extension::Effect* module) { _brightness = module->get_param_float("brightness"); _saturation = module->get_param_float("saturation"); _hue = module->get_param_float("hue"); } #include "../clear-n_.h" void Modulate::init(void) { Inkscape::Extension::build_from_mem( "\n" "" N_("Modulate") "\n" "org.inkscape.effect.bitmap.modulate\n" "1\n" "1\n" "0\n" "\n" "all\n" "\n" "\n" "\n" "" N_("Modulate percent hue, saturation, and brightness of selected bitmap(s).") "\n" "\n" "\n", new Modulate()); } }; /* namespace Bitmap */ }; /* namespace Internal */ }; /* namespace Extension */ }; /* namespace Inkscape */