ILayerEffect.EffectType
ILayerEffect.EffectType property
Krijgt een type effect
public LayerEffectsTypes EffectType { get; }
Voorbeelden
De volgende code demonstreert de ondersteuning van de eigenschap ILayerEffect.EffectType.
[C#]
string inputFile = "input.psd";
string outputWithout = "outputWithout.png";
string outputWith = "outputWith.png";
using (PsdImage psdImage = (PsdImage)Image.Load(inputFile, new LoadOptions()))
{
psdImage.Save(outputWithout, new PngOptions());
Layer workLayer = psdImage.Layers[1];
DropShadowEffect dropShadowEffect = workLayer.BlendingOptions.AddDropShadow();
dropShadowEffect.Distance = 0;
dropShadowEffect.Size = 8;
dropShadowEffect.Opacity = 20;
foreach (ILayerEffect iEffect in workLayer.BlendingOptions.Effects)
{
if (iEffect.EffectType == LayerEffectsTypes.DropShadow)
{
// het ving
psdImage.Save(outputWith, new PngOptions());
}
}
}
Zie ook
- enum LayerEffectsTypes
- interface ILayerEffect
- naamruimte Aspose.PSD.FileFormats.Psd.Layers.LayerEffects
- montage Aspose.PSD