LengthRecord.LengthRecord

LengthRecord(byte[])

の新しいインスタンスを初期化しますLengthRecordclass.

public LengthRecord(byte[] data)
パラメータタイプ説明
dataByte[]記録データです。

例外

例外調子
!:PsdImageArgumentExceptionLengthRecord 作成のための不正なデータ

関連項目


LengthRecord()

の新しいインスタンスを初期化しますLengthRecordclass.

public LengthRecord()

次のコード例は、新しい LengthRecord プロパティ、PathOperations (ブール演算)、ShapeIndex、および BezierKnotRecordsCount のサポートを示しています。

[C#]

string sourceFilePath = "PathOperationsShape.psd";
string outputFilePath = "out_PathOperationsShape.psd";

using (var im = (PsdImage)Image.Load(sourceFilePath))
{
    VsmsResource resource = null;
    foreach (var layerResource in im.Layers[1].Resources)
    {
        if (layerResource is VsmsResource)
        {
            resource = (VsmsResource)layerResource;
            break;
        }
    }

    LengthRecord lengthRecord0 = (LengthRecord)resource.Paths[2];
    LengthRecord lengthRecord1 = (LengthRecord)resource.Paths[7];
    LengthRecord lengthRecord2 = (LengthRecord)resource.Paths[11];

    // ここで、シェイプ間の結合方法を変更します。
    lengthRecord0.PathOperations = PathOperations.ExcludeOverlappingShapes;
    lengthRecord1.PathOperations = PathOperations.IntersectShapeAreas;
    lengthRecord2.PathOperations = PathOperations.SubtractFrontShape;

    im.Save(outputFilePath);
}

関連項目