Class VectorShapeOriginSettings
Contents
[
Hide
]VectorShapeOriginSettings class
Vector shape origination settings.
public sealed class VectorShapeOriginSettings
Constructors
Name | Description |
---|---|
VectorShapeOriginSettings() | Initializes a new instance of the VectorShapeOriginSettings class. |
VectorShapeOriginSettings(bool, int) | Initializes a new instance of the VectorShapeOriginSettings class. |
Properties
Name | Description |
---|---|
IsOriginBoxCornersPresent { get; } | Gets a value indicating whether this instance has the origin box corners property. |
IsOriginIndexPresent { get; } | Gets a value indicating whether this instance has origin index property. |
IsOriginRadiiRectanglePresent { get; } | Gets a value indicating whether this instance has the origin radii rectangle property. |
IsOriginResolutionPresent { get; } | Gets a value indicating whether this instance has origin resolution property. |
IsOriginShapeBBoxPresent { get; } | Gets a value indicating whether this instance has the rectangle property. |
IsOriginTypePresent { get; } | Gets a value indicating whether this instance has origin type property. |
IsShapeInvalidated { get; set; } | Gets or sets a value indicating whether shape is invalidated. |
IsShapeInvalidatedPresent { get; } | Gets a value indicating whether this instance has a shape invalidated property set. |
IsTransformPresent { get; } | Gets a value indicating whether this instance has the transform property. |
OriginBoxCorners { get; set; } | Gets or sets the origin box corners. |
OriginIndex { get; set; } | Gets or sets the origin shape index. |
OriginRadiiRectangle { get; set; } | Gets or sets the origin radii rectangle. |
OriginResolution { get; set; } | Gets or sets the origin resolution. |
OriginShapeBox { get; set; } | Gets or sets the origin shape bounding box. |
OriginType { get; set; } | Gets or sets the type of the origin. |
Transform { get; set; } | Gets or sets the transformation matrix. |
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
- namespace Aspose.PSD.FileFormats.Core.VectorPaths
- assembly Aspose.PSD