ImageEn, unit iexProcEffects |
|
TIEImageEffectsList.Items
Declaration
property Items[Index: Integer]: TIEImageEffect;
Description
Return an item from the active effects list.
Note: If a
TImageEnView is being used, you MUST call ImageEnView1.Update() after setting properties for an item
// Add a rotation effect to the image chain
idx := ImageEnView1.IEBitmap.EffectsChain.Add( peRotate );
ImageEnView1.IEBitmap.EffectsChain.Items[idx].Rotate_Angle := 90;
ImageEnView1.IEBitmap.EffectsChain.Items[idx].Rotate_Antialias := ierBicubic;
ImageEnView1.Update(); // Must call update after manually setting properties
// If Contrast effect has been added, then modify it. Otherwise add it
idx := ImageEnView1.IEBitmap.EffectsChain.EffectToIndex( peContrast );
if idx = -1 then
idx := ImageEnView1.IEBitmap.EffectsChain.Add( peContrast );
ImageEnView1.IEBitmap.EffectsChain.Items[idx].Contrast_Contrast := trkContrast.Position;
ImageEnView1.Update(); // Must call update after manually setting properties
// If HSV effect has been added, then modify it. Otherwise add it
idx := ImageEnView1.IEBitmap.EffectsChain.EffectToIndex( peHSV );
if idx = -1 then
idx := ImageEnView1.IEBitmap.EffectsChain.Add( peHSV );
ImageEnView1.IEBitmap.EffectsChain.Items[idx].HSV_H := trkHsvH.Position;
ImageEnView1.Update(); // Must call update after manually setting properties
// Disable all the effects (but don't delete them)
for i := 0 to ImageEnView1.IEBitmap.EffectsChain.Count - 1 do
ImageEnView1.IEBitmap.EffectsChain.Items[i].Enabled := False;
ImageEnView1.Update(); // Must call update after manually setting properties
// Display the active list of effects assigned to the image
cbxEffects.Clear;
for i := 0 to ImageEnView1.IEBitmap.EffectsChain.Count - 1 do
begin
cbxEffects.Items.Add( ImageEnView1.IEBitmap.EffectsChain.Items[i].Description() );
cbxEffects.Checked[ i ] := ImageEnView1.IEBitmap.EffectsChain.Items[i].Enabled;
end;