Skip to content

Writing a Configurable Effect

Cameron White edited this page Jul 26, 2013 · 6 revisions

Most effects and adjustments allow the user to customize settings to achieve the desired effect.

This guide builds on the effect written in [Writing an Effect or Adjustment] (https://github.com/PintaProject/Pinta/wiki/Writing-an-Effect-or-Adjustment). In that sample, the effect provided a basic night vision effects. This guide will expand that effect to be configurable, so that the user can customize the brightness of the effect.

The Basics

In order to make the effect configurable, there are two properties that we must override:

public override bool IsConfigurable { get { return true; } }

public override bool LaunchConfiguration ()
{
    // Return true if the user accepted the configuration.
    // Return false if the user cancelled.
    return true;
}

In the LaunchConfiguration method, you can do whatever is necessary for configuring the effect, such as showing a dialog with options for the user to manipulate.

Making it Easier

Another Example

For a complete reference of the supported options, see [SimpleEffectDialog Reference] (https://github.com/PintaProject/Pinta/wiki/SimpleEffectDialog-Reference).

Clone this wiki locally