contrast.cpp revision 273e421813f295d65aab512f508e8fb575d997d4
273e421813f295d65aab512f508e8fb575d997d4gouldtj/*
273e421813f295d65aab512f508e8fb575d997d4gouldtj * Copyright (C) 2007 Authors:
273e421813f295d65aab512f508e8fb575d997d4gouldtj * Christopher Brown <audiere@gmail.com>
273e421813f295d65aab512f508e8fb575d997d4gouldtj * Ted Gould <ted@gould.cx>
273e421813f295d65aab512f508e8fb575d997d4gouldtj *
273e421813f295d65aab512f508e8fb575d997d4gouldtj * Released under GNU GPL, read the file 'COPYING' for more information
273e421813f295d65aab512f508e8fb575d997d4gouldtj */
273e421813f295d65aab512f508e8fb575d997d4gouldtj
273e421813f295d65aab512f508e8fb575d997d4gouldtj#include "extension/effect.h"
273e421813f295d65aab512f508e8fb575d997d4gouldtj#include "extension/system.h"
273e421813f295d65aab512f508e8fb575d997d4gouldtj
273e421813f295d65aab512f508e8fb575d997d4gouldtj#include "contrast.h"
273e421813f295d65aab512f508e8fb575d997d4gouldtj
273e421813f295d65aab512f508e8fb575d997d4gouldtjnamespace Inkscape {
273e421813f295d65aab512f508e8fb575d997d4gouldtjnamespace Extension {
273e421813f295d65aab512f508e8fb575d997d4gouldtjnamespace Internal {
273e421813f295d65aab512f508e8fb575d997d4gouldtjnamespace Bitmap {
273e421813f295d65aab512f508e8fb575d997d4gouldtj
273e421813f295d65aab512f508e8fb575d997d4gouldtjvoid
273e421813f295d65aab512f508e8fb575d997d4gouldtjContrast::applyEffect(Magick::Image *image) {
273e421813f295d65aab512f508e8fb575d997d4gouldtj printf("(o0x) Sharpening at: %i\n", _sharpen);
273e421813f295d65aab512f508e8fb575d997d4gouldtj image->contrast(_sharpen);
273e421813f295d65aab512f508e8fb575d997d4gouldtj}
273e421813f295d65aab512f508e8fb575d997d4gouldtj
273e421813f295d65aab512f508e8fb575d997d4gouldtjvoid
273e421813f295d65aab512f508e8fb575d997d4gouldtjContrast::refreshParameters(Inkscape::Extension::Effect *module) {
273e421813f295d65aab512f508e8fb575d997d4gouldtj _sharpen = module->get_param_bool("sharpen");
273e421813f295d65aab512f508e8fb575d997d4gouldtj}
273e421813f295d65aab512f508e8fb575d997d4gouldtj
273e421813f295d65aab512f508e8fb575d997d4gouldtj#include "../clear-n_.h"
273e421813f295d65aab512f508e8fb575d997d4gouldtj
273e421813f295d65aab512f508e8fb575d997d4gouldtjvoid
273e421813f295d65aab512f508e8fb575d997d4gouldtjContrast::init(void)
273e421813f295d65aab512f508e8fb575d997d4gouldtj{
273e421813f295d65aab512f508e8fb575d997d4gouldtj Inkscape::Extension::build_from_mem(
273e421813f295d65aab512f508e8fb575d997d4gouldtj "<inkscape-extension>\n"
273e421813f295d65aab512f508e8fb575d997d4gouldtj "<name>" N_("Contrast") "</name>\n"
273e421813f295d65aab512f508e8fb575d997d4gouldtj "<id>org.inkscape.effect.bitmap.contrast</id>\n"
273e421813f295d65aab512f508e8fb575d997d4gouldtj "<param name=\"sharpen\" gui-text=\"" N_("Sharpen") "\" type=\"boolean\" >1</param>\n"
273e421813f295d65aab512f508e8fb575d997d4gouldtj "<effect>\n"
273e421813f295d65aab512f508e8fb575d997d4gouldtj "<object-type>all</object-type>\n"
273e421813f295d65aab512f508e8fb575d997d4gouldtj "<effects-menu>\n"
273e421813f295d65aab512f508e8fb575d997d4gouldtj "<submenu name=\"" N_("Raster") "\" />\n"
273e421813f295d65aab512f508e8fb575d997d4gouldtj "</effects-menu>\n"
273e421813f295d65aab512f508e8fb575d997d4gouldtj "<menu-tip>" N_("Apply Contrast Effect") "</menu-tip>\n"
273e421813f295d65aab512f508e8fb575d997d4gouldtj "</effect>\n"
273e421813f295d65aab512f508e8fb575d997d4gouldtj "</inkscape-extension>\n", new Contrast());
273e421813f295d65aab512f508e8fb575d997d4gouldtj}
273e421813f295d65aab512f508e8fb575d997d4gouldtj
273e421813f295d65aab512f508e8fb575d997d4gouldtj}; /* namespace Bitmap */
273e421813f295d65aab512f508e8fb575d997d4gouldtj}; /* namespace Internal */
273e421813f295d65aab512f508e8fb575d997d4gouldtj}; /* namespace Extension */
273e421813f295d65aab512f508e8fb575d997d4gouldtj}; /* namespace Inkscape */