تأثير السكتة الدماغية مع ملء اللون
Contents
[
Hide
]
تأثير السكتة الدماغية مع ملء اللون
يوضح هذا المقال كيفية عرض تأثير السكتة الدماغية بملء اللون. يتم استخدام تأثير السكتة الدماغية لإضافة سكتات دماغية وحدود للطبقات والأشكال. يمكن استخدامه لإنشاء خطوط ذات لون صلب، وتدرجات ملونة، فضلاً عن حدود مبتكرة.
خطوات عرض تأثير السكتة الدماغية مع ملء اللون بسيطة كما يلي:
- ضبط خاصية LoadEffectsResource.
- تحميل ملف PSD كصورة باستخدام الطريقة المصنعية Load التي تعرضها فئة الصورة وتعريف PsdLoadOptions.
- ضبط خصائص الإعدادات لـ ColorFillSetting..
- حفظ النتائج.
الكود البرمجي التالي يوضح لك كيفية عرض تأثير السكتة الدماغية مع ملء اللون.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-psd/Aspose.PSD-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_PSD(); | |
// Implement rendering of Stroke effect with Color Fill for export | |
string sourceFileName = dataDir + "StrokeComplex.psd"; | |
string exportPath = dataDir + "StrokeComplexRendering.psd"; | |
string exportPathPng = dataDir + "StrokeComplexRendering.png"; | |
var loadOptions = new PsdLoadOptions() | |
{ | |
LoadEffectsResource = true | |
}; | |
using (var im = (PsdImage)Image.Load(sourceFileName, loadOptions)) | |
{ | |
for (int i = 0; i < im.Layers.Length; i++) | |
{ | |
var effect = (StrokeEffect)im.Layers[i].BlendingOptions.Effects[0]; | |
var settings = (ColorFillSettings)effect.FillSettings; | |
settings.Color = Color.DeepPink; | |
} | |
// Save psd | |
im.Save(exportPath, new PsdOptions()); | |
// Save png | |
im.Save(exportPathPng, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha }); | |
} |