WarpSettings.ProcessingArea
Contents
[
Hide
]WarpSettings.ProcessingArea property
Gets or sets value of processing area size. Default value is 10. Range is [2;40]
public int ProcessingArea { get; set; }
Examples
The following code demonstrates WarpSettings.ProcessingArea property to configure warp deformation.
[C#]
string sourceFile = "Warping.psd";
List<string> outputFiles = new List<string>();
PsdLoadOptions loadOptions = new PsdLoadOptions() { LoadEffectsResource = true, AllowWarpRepaint = true };
int[] areaValues = { 5, 10, 25, 40 };
for (int i = 0; i < 4; i++)
{
using (var psdImage = (PsdImage)Image.Load(sourceFile, loadOptions))
{
// It gets WarpSettings from Smart Layer
WarpSettings warpSettings = ((SmartObjectLayer)psdImage.Layers[1]).WarpSettings;
// It sets size of warp processing area
warpSettings.ProcessingArea = areaValues[i];
((SmartObjectLayer)psdImage.Layers[1]).WarpSettings = warpSettings;
string outputFile = "export" + areaValues[i] + ".png";
outputFiles.Add(outputFile);
// There should no error here
psdImage.Save(outputFile, new PngOptions { ColorType = PngColorType.TruecolorWithAlpha });
}
}
See Also
- class WarpSettings
- namespace Aspose.PSD.FileFormats.Psd.Layers.Warp
- assembly Aspose.PSD