VectorShapeOriginSettings Class
Vector shape origination settings.
Inheritance Hierarchy
SystemObject
  Aspose.PSD.FileFormats.Core.VectorPathsVectorShapeOriginSettings

Namespace: Aspose.PSD.FileFormats.Core.VectorPaths
Assembly: Aspose.PSD (in Aspose.PSD.dll) Version: 21.11
Syntax
public sealed class VectorShapeOriginSettings

The VectorShapeOriginSettings type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleVectorShapeOriginSettings
Initializes a new instance of the VectorShapeOriginSettings class.
Public methodCode exampleVectorShapeOriginSettings(Boolean, Int32) Obsolete.
Initializes a new instance of the VectorShapeOriginSettings class.
Properties
  NameDescription
Public propertyCode exampleIsOriginBoxCornersPresent
Gets a value indicating whether this instance has the origin box corners property.
Public propertyIsOriginIndexPresent
Gets a value indicating whether this instance has origin index property.
Public propertyIsOriginRadiiRectanglePresent
Gets a value indicating whether this instance has the origin radii rectangle property.
Public propertyIsOriginResolutionPresent
Gets a value indicating whether this instance has origin resolution property.
Public propertyIsOriginShapeBBoxPresent
Gets a value indicating whether this instance has the rectangle property.
Public propertyIsOriginTypePresent
Gets a value indicating whether this instance has origin type property.
Public propertyCode exampleIsShapeInvalidated
Gets or sets a value indicating whether shape is invalidated.
Public propertyIsShapeInvalidatedPresent
Gets a value indicating whether this instance has a shape invalidated property set.
Public propertyCode exampleIsTransformPresent
Gets a value indicating whether this instance has the transform property.
Public propertyCode exampleOriginBoxCorners
Gets or sets the origin box corners.
Public propertyCode exampleOriginIndex
Gets or sets the origin shape index.
Public propertyOriginRadiiRectangle
Gets or sets the origin radii rectangle.
Public propertyOriginResolution
Gets or sets the origin resolution.
Public propertyOriginShapeBox
Gets or sets the origin shape bounding box.
Public propertyOriginType
Gets or sets the type of the origin.
Public propertyCode exampleTransform
Gets or sets the transformation matrix.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Examples
The following example demonstrates the support of VogkResource resource.
[C#]

VogkResource GetVogkResource(PsdImage image)
{
    var layer = image.Layers[1];

    VogkResource resource = null;
    var resources = layer.Resources;
    for (int i = 0; i < resources.Length; i++)
    {
        if (resources[i] is VogkResource)
        {
            resource = (VogkResource)resources[i];
            break;
        }
    }

    if (resource == null)
    {
        throw new Exception("VogkResourcenot found.");
    }

    return resource;
}

string sourceFilePath = "VectorOriginationDataResource.psd";
string outputFilePath = "out_VectorOriginationDataResource_.psd";

using (var psdImage = (PsdImage)Image.Load(sourceFilePath))
{
    var resource = GetVogkResource(psdImage);

    // Reading
    if (resource.ShapeOriginSettings.Length != 1 ||
        !resource.ShapeOriginSettings[0].IsShapeInvalidated ||
        resource.ShapeOriginSettings[0].OriginIndex != 0)
    {
        throw new Exception("VogkResource were read wrong.");
    }

    // Editing
    resource.ShapeOriginSettings = new[]
    {
                    resource.ShapeOriginSettings[0],
                    new VectorShapeOriginSettings(true, 1)
                };

    psdImage.Save(outputFilePath);
}
See Also