// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2007 Authors: * Christopher Brown * Ted Gould * * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ #include "extension/effect.h" #include "extension/system.h" #include "opacity.h" #include namespace Inkscape { namespace Extension { namespace Internal { namespace Bitmap { void Opacity::applyEffect(Magick::Image* image) { Magick::Quantum opacity = Magick::Color::scaleDoubleToQuantum((100 - _opacity) / 100.0); image->opacity(opacity); } void Opacity::refreshParameters(Inkscape::Extension::Effect* module) { _opacity = module->get_param_float("opacity"); } #include "../clear-n_.h" void Opacity::init() { // clang-format off Inkscape::Extension::build_from_mem( "\n" "" N_("Opacity") "\n" "org.inkscape.effect.bitmap.opacity\n" "80.0\n" "\n" "all\n" "\n" "\n" "\n" "" N_("Modify opacity channel(s) of selected bitmap(s)") "\n" "\n" "\n", new Opacity()); // clang-format on } }; /* namespace Bitmap */ }; /* namespace Internal */ }; /* namespace Extension */ }; /* namespace Inkscape */