Class DropShadowEffect
Contenuti
[
Nascondere
]DropShadowEffect class
Effetto livello ombra esterna
public class DropShadowEffect : IShadowEffect
Proprietà
| Nome | Descrizione |
|---|---|
| Angle { get; set; } | Ottiene o imposta l’angolo in gradi. |
| BlendMode { get; set; } | Ottiene o imposta la modalità di fusione. |
| Color { get; set; } | Ottiene o imposta il colore. |
| Distance { get; set; } | Ottiene o imposta la distanza in pixel. |
| EffectType { get; } | Ottiene un tipo di effetto |
| IsVisible { get; set; } | Ottiene o imposta un valore che indica se questa istanza è visibile. |
| KnocksOut { get; set; } | Ottiene o imposta un valore che indica se [knock out]. |
| Noise { get; set; } | Ottiene o imposta il rumore. |
| Opacity { get; set; } | Ottiene o imposta l’opacità. |
| Size { get; set; } | Ottiene o imposta il valore di sfocatura in pixel. |
| Spread { get; set; } | Ottiene o imposta l’intensità come percentuale. |
| UseGlobalLight { get; set; } | Ottiene o imposta un valore che indica se [utilizzare questo angolo in tutti gli effetti di livello]. |
Esempi
Il codice seguente illustra il supporto per la proprietà PsdImage.GlobalAngle per modificare il valore dell’angolo globale.
[C#]
// Quando la proprietà DropShadowEffect.UseGlobalLight è 'true', l'oggetto DropShadowEffect utilizza il valore dell'angolo dalla proprietà PsdImage.GlobalAngle.
using (PsdImage image = (PsdImage)Image.Load("4.psd"))
{
image.GlobalAngle = 30;
image.Save("output.psd");
}
Il codice seguente illustra l’utilizzo della proprietà Opacity di DropShadowEffect.
[C#]
string inputFile = "input.psd";
string outputImage20 = "outputImage20.png";
string outputImage200 = "outputImage200.png";
using (PsdImage psdImage = (PsdImage)Image.Load(inputFile, new LoadOptions()))
{
Layer workLayer = psdImage.Layers[1];
DropShadowEffect dropShadowEffect = workLayer.BlendingOptions.AddDropShadow();
dropShadowEffect.Distance = 0;
dropShadowEffect.Size = 8;
// Esempio con Opacità = 20
dropShadowEffect.Opacity = 20;
psdImage.Save(outputImage20, new PngOptions());
// Esempio con Opacità = 200
dropShadowEffect.Opacity = 200;
psdImage.Save(outputImage200, new PngOptions());
}
Guarda anche
- interface IShadowEffect
- spazio dei nomi Aspose.PSD.FileFormats.Psd.Layers.LayerEffects
- assemblea Aspose.PSD