LayerStateEffects.AddGradientOverlay
LayerStateEffects.AddGradientOverlay method
Ajoute l’effet de superposition de dégradé.
public GradientOverlayEffect AddGradientOverlay()
Return_Value
La nouvelle instance deGradientOverlayEffect
classe.
Exemples
Le code suivant illustre la prise en charge des effets dans les images de la chronologie.
[C#]
string sourceFile = "4_animated.psd";
string outputFile = "output.psd";
using (var psdImage = (PsdImage)Image.Load(sourceFile))
{
TimeLine timeLine = TimeLine.InitializeFrom(psdImage);
int[] layerIds = timeLine.LayerIds;
var layerStateEffects11 = timeLine.Frames[1].LayerStates[layerIds[1]].StateEffects;
layerStateEffects11.AddDropShadow();
layerStateEffects11.AddGradientOverlay();
var layerStateEffects21 = timeLine.Frames[2].LayerStates[layerIds[1]].StateEffects;
layerStateEffects21.AddStroke(FillType.Color);
layerStateEffects21.IsVisible = false;
timeLine.ApplyTo(psdImage);
psdImage.Save(outputFile);
}
Voir également
- class GradientOverlayEffect
- class LayerStateEffects
- espace de noms Aspose.PSD.FileFormats.Psd.Layers.Animation
- Assemblée Aspose.PSD