VectorShapeOriginSettings.IsTransformPresent

VectorShapeOriginSettings.IsTransformPresent property

获取一个值,指示此实例是否具有转换属性。

public bool IsTransformPresent { get; }

适当的价值

真的如果此实例具有转换属性;否则,错误的 .

例子

以下代码演示了调整包含矢量路径的形状图层大小的能力。

[C#]

string sourceFileName = "vectorShapes.psd";
string outputFileName = "out_vectorShapes.psd";
string sourcePath = sourceFileName;
string outputPath = outputFileName;
string outputPathPng = Path.ChangeExtension(outputPath, ".png");
using (var psdImage = (PsdImage)Image.Load(sourcePath))
{
    foreach (var layer in psdImage.Layers)
    {
        layer.Resize(layer.Width * 5 / 4, layer.Height / 2);
    }

    psdImage.Save(outputPath);
    psdImage.Save(outputPathPng, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
}

也可以看看