ImageEn, unit iexProcEffects |
|
TIEImageEffectsList.Insert
Declaration
procedure Insert(Index: integer; v: TIEImageEffect); overload;
procedure Insert(Index: integer; Operation: TPreviewEffect); overload;
function Insert(Index: integer; (pe: TPreviewEffects = [peAll]): integer; overload;
Description
Insert a new effect into the
active effects list of the image.
If a single effect is specified (e.g peRotate), it is added directly. If a set is specified (e.g [peRotate] or ppeColorAdjustments), then the
Previews dialog is displayed.
Generally it will be used in one of the two following ways:
1. Prompt the user to specify an effect from the
Proc Previews dialog
// Prompt the user to specify a color adjustment (do not need to call ImageEnView1.Update)
ImageEnView1.IEBitmap.EffectsChain.Insert( 0, ppeColorAdjustments );
2. Inserting a custom effect using code (in combination with
CurrentItem)
// Insert a rotation effect to the image chain
ImageEnView1.IEBitmap.EffectsChain.Insert( 0, peRotate );
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Rotate_Angle := 90;
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Rotate_Antialias := ierBicubic;
ImageEnView1.Update(); // Must call update after manually setting properties
Note: If a
TImageEnView is being used, you MUST call ImageEnView1.Update() after inserting an item (except for the TPreviewEffects overload)
// Prompt the user to specify a color adjustment, e.g. hue, contrast, automatic-enhancement, etc.
ImageEnView1.IEBitmap.EffectsChain.Insert( 0, ppeColorAdjustments );
// Prompt the user to specify an editing effect, e.g. rotation, resizing or cropping
ImageEnView1.IEBitmap.EffectsChain.Insert( 0, ppeEditingFunctions );
// Prompt the user to specify an image effect, e.g. Lens or Wave effect
ImageEnView1.IEBitmap.EffectsChain.Insert( 0, ppeSpecialEffects );
// Prompt the user to specify image rotation
ImageEnView1.IEBitmap.EffectsChain.Insert( 0, [peRotate] );
// Insert a horizontal flip
ImageEnView1.IEBitmap.EffectsChain.Insert( peRotate ); // Rotation and flipping type
ImageEnView1.IEBitmap.EffectsChain.CurrentItem.Flip_Horz := True;
ImageEnView1.Update(); // Must call update after manually setting properties