Declaration
property SoftShadow: TIEVSoftShadow;
Description
Enables and sets the properties of the layer shadow.
Note:
◼Shadows cannot be enabled for the background layer (layer 0)
◼Anti-aliased curves may be affected by adding a soft shadow (looking more blocky or showing color artifacts). Use
LayerShadowAlphaThreshold to lessen this effect
◼Shadows are not rendered onscreen at zoom levels above 500% to prevent performance issues
// Display a soft shadow effect for the current layer
ImageEnView1.CurrentLayer.SoftShadow.Enabled := True;
ImageEnView1.Update();
// Load an image, add text with a soft shadow and save it
var
iev : TImageEnView;
begin
iev := TImageEnView.Create( nil );
iev.IEBitmap.LoadFromFile( 'd:\image.jpg' );
iev.LayersAdd( ielkText, 100, 100 );
TIETextLayer( iev.CurrentLayer ).Text := 'This is a test';
TIETextLayer( iev.CurrentLayer ).Font.Size := 30;
TIETextLayer( iev.CurrentLayer ).Font.Style := [fsBold];
iev.CurrentLayer.SoftShadow.Enabled := True;
iev.LayersMergeAll();
iev.IEBitmap.SaveToFile( 'd:\image_out.jpg' );
iev.Free;
end;
// Add an outer glow effect to the current layer
ImageEnView1.CurrentLayer.SoftShadow.Enabled := True;
ImageEnView1.CurrentLayer.SoftShadow.OffsetX := 0;
ImageEnView1.CurrentLayer.SoftShadow.OffsetY := 0;
ImageEnView1.CurrentLayer.SoftShadow.ShadowColor := TColor2TRGB( clRed );
ImageEnView1.CurrentLayer.SoftShadow.Radius := 5;
ImageEnView1.Update();
See Also
◼LayersFastDrawing◼LayerShadowAlphaThreshold◼InnerGlow◼TColor2TRGB