ShapeLayer.Update
ShapeLayer.Update method
Updates resources from Shape layer properties.
public void Update()
Examples
The following code shows support for the ShapeLayer layer.
[C#]
string srcFile = "ShapeLayerTest.psd";
string outFile = "ShapeLayerTest-out.psd";
using (PsdImage image = (PsdImage)Image.Load(srcFile, new PsdLoadOptions { LoadEffectsResource = true }))
{
ShapeLayer shapeLayer = (ShapeLayer)image.Layers[1];
IPath layerPath = shapeLayer.Path;
IPathShape[] pathShapeSource = layerPath.GetItems();
List<IPathShape> pathShapesDest = new List<IPathShape>(pathShapeSource);
// Source file contains 2 figures. Remove the seconds one.
pathShapesDest.RemoveAt(1);
layerPath.SetItems(pathShapesDest.ToArray());
shapeLayer.Update();
image.Save(outFile);
}
See Also
- class ShapeLayer
- namespace Aspose.PSD.FileFormats.Psd.Layers
- assembly Aspose.PSD