VectorPathDataResource Class
Class VectorPathDataResource. This resource contains information about vector layer mask
Inheritance Hierarchy
SystemObject
  Aspose.PSD.FileFormats.Psd.LayersLayerResource
    Aspose.PSD.FileFormats.Psd.Layers.LayerResourcesVectorPathDataResource
      Aspose.PSD.FileFormats.Psd.Layers.LayerResourcesVmskResource
      Aspose.PSD.FileFormats.Psd.Layers.LayerResourcesVsmsResource

Namespace: Aspose.PSD.FileFormats.Psd.Layers.LayerResources
Assembly: Aspose.PSD (in Aspose.PSD.dll) Version: 21.10
Syntax
public abstract class VectorPathDataResource : LayerResource, 
	IVectorPathData

The VectorPathDataResource type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyIsDisabled
Gets or sets a value indicating whether this instance is disabled.
Public propertyIsInverted
Gets or sets a value indicating whether this instance is inverted.
Public propertyIsNotLinked
Gets or sets a value indicating whether this instance is not linked.
Public propertyKey
Gets the layer resource key.
(Inherited from LayerResource.)
Public propertyLength
Gets the layer resource length in bytes.
(Overrides LayerResourceLength.)
Public propertyPaths
Gets or sets the path records.
Public propertyPsdVersion
Gets the psd version.
(Overrides LayerResourcePsdVersion.)
Public propertySignature
Gets the signature.
(Overrides LayerResourceSignature.)
Public propertyVersion
Gets or sets the version.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodSave
Saves the resource to the specified stream container.
(Overrides LayerResourceSave(StreamContainer, Int32).)
Protected methodSaveResourceHeader
Saves the resource header.
(Inherited from LayerResource.)
Public methodToString
Returns a String that represents this instance.
(Inherited from LayerResource.)
Examples
The following example demonstrates the support of Layer Vector Masks processing. How works the editing of paths and how Aspose.PSD draw the final image.
[C#]

string sourceFileName = "DifferentLayerMasks_Source.psd";
string exportPath = "DifferentLayerMasks_Export.psd";
string exportPathPng = "DifferentLayerMasks_Export.png";

// Reading
using (PsdImage image = (PsdImage)Image.Load(sourceFileName))
{
    // Make changes to the vector path points
    foreach (var layer in image.Layers)
    {
        foreach (var layerResource in layer.Resources)
        {
            var resource = layerResource as VectorPathDataResource;
            if (resource != null)
            {
                foreach (var pathRecord in resource.Paths)
                {
                    var bezierKnotRecord = pathRecord as BezierKnotRecord;
                    if (bezierKnotRecord != null)
                    {
                        Point p0 = bezierKnotRecord.Points[0];
                        bezierKnotRecord.Points[0] = bezierKnotRecord.Points[2];
                        bezierKnotRecord.Points[2] = p0;
                        break;
                    }
                }
            }
        }
    }

    // Exporting
    image.Save(exportPath);
    image.Save(exportPathPng, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
}
See Also