Skip to content

BaseEffect Reference

Cameron White edited this page Jul 7, 2013 · 5 revisions

The BaseEffect class provides several methods that can be used to specify how your effect should be presented to the user.

Name

This specifies the name of the effect, and is used in the Adjustments/Effects menu and in the History pad. This property is abstract, so every effect must implement it:

public override string Name {
    get { return AddinManager.CurrentLocalizer.GetString ("My Effect"); }
}

Icon

TODO - see https://bugs.launchpad.net/pinta/+bug/1198593

EffectMenuCategory

This specifies the category under the "Effects" menu that the effect will be placed in. The default category is "General", and this property does not affect Adjustments.

Pinta ships with the following default categories:

  • Artistic
  • Blurs
  • Distort
  • Noise
  • Photo
  • Render
  • Stylize

It is highly recommended that you use one of the predefined categories:

public override string EffectMenuCategory {
    get { return AddinManager.CurrentLocalizer.GetString ("Stylize"); }
}

AdjustmentMenuKey

This specifies the keyboard shortcut for an adjustment, and is not used for effects. By default, adjustments do not receive shortcuts, but you can override this property to specify a shortcut:

public override Gdk.Key AdjustmentMenuKey {
    get { return Gdk.Key.K; }
}

AdjustmentMenuKeyModifiers

This specifies the modifiers for an adjustment's keyboard shortcut, and is not used for effects. By default, the modifiers are Ctrl+Shift, but you can override this property to specify a different modifier:

public override Gdk.ModifierType AdjustmentMenuKeyModifiers {
    get { return Gdk.ModifierType.ControlMask; }
}