Class LayerStateEffects

LayerStateEffects class

The layer state effects.

public class LayerStateEffects

Properties

NameDescription
Effects { get; }Gets the layer effects.
IsVisible { get; set; }Gets or sets a value indicating whether this instance is visible.

Methods

NameDescription
AddColorOverlay()Adds the color overlay effect.
AddDropShadow()Adds the drop shadow effect.
AddGradientOverlay()Adds the gradient overlay effect.
AddInnerShadow()Adds the inner shadow effect.
AddOuterGlow()Adds the outer glow effect.
AddPatternOverlay()Adds the pattern overlay effect.
AddStroke(FillType)Adds the stroke effect.
ClearLayerStyle()Clears all layer style effects.
RemoveEffectAt(int)Removes the the layer effect at the specific index.

Examples

The following code demonstrates support of effects in Timeline frames.

[C#]

string sourceFile = "4_animated.psd";
string outputFile = "output.psd";

using (var psdImage = (PsdImage)Image.Load(sourceFile))
{
    Timeline timeline = psdImage.Timeline;

    var layerStateEffects11 = timeline.Frames[1].LayerStates[1].StateEffects;

    layerStateEffects11.AddDropShadow();
    layerStateEffects11.AddGradientOverlay();

    var layerStateEffects21 = timeline.Frames[2].LayerStates[1].StateEffects;
    layerStateEffects21.AddStroke(FillType.Color);
    layerStateEffects21.IsVisible = false;

    psdImage.Save(outputFile);
}

See Also