Class VstkResource

VstkResource class

Resource class VstkResource. Contains information about Vector Stroke Data. Resource should be initialized either by AssignItems method from ResourceLoader, either by assigning values to properties of the class.

public class VstkResource : LayerResource

Constructors

NameDescription
VstkResource()The default constructor.

Properties

NameDescription
FillEnabled { get; set; }Gets or sets a value indicating whether Stroke fill enabled.
FillSettings { get; set; }Gets or sets Fill settings of the Stroke.
override Key { get; }Gets the layer resource key.
override Length { get; }Gets the layer resource length in bytes.
override PsdVersion { get; }Gets the psd version.
override Signature { get; }Gets the signature.
StrokeEnabled { get; set; }Gets or sets a value indicating whether stroke effect enabled.
StrokeStyleBlendMode { get; set; }Gets or sets Stroke Blend mode.
StrokeStyleContent { get; set; }Gets or sets Stroke entity. Property determines fill settings of the stroke.
StrokeStyleLineAlignment { get; set; }Gets or sets Stroke style line alignment.
StrokeStyleLineCapType { get; set; }Gets or sets the type of the stroke style line cap.
StrokeStyleLineCapWidth { get; set; }Gets or sets Stroke line cap width.
StrokeStyleLineDashOffset { get; set; }Gets or sets the stroke style line dash offset.
StrokeStyleLineDashSet { get; set; }Gets or sets array of line dashes.
StrokeStyleLineJoinType { get; set; }Gets or sets Stroke style line join type.
StrokeStyleLineWidth { get; set; }Gets or sets Stroke line width.
StrokeStyleMiterLimit { get; set; }Gets or sets the stroke style miter limit.
StrokeStyleOpacity { get; set; }Gets or sets Stroke style opacity (0-100%).
StrokeStyleResolution { get; set; }Gets or sets Stroke style resolution.
StrokeStyleScaleLock { get; set; }Gets or sets Stroke style scale lock.
StrokeStyleStrokeAdjust { get; set; }Gets or sets Stroke adjust.
StrokeStyleVersion { get; set; }Gets or sets the stroke style version.

Methods

NameDescription
override Save(StreamContainer, int)Saves the resource to the specified stream container.
override ToString()Returns a String that represents this instance.

Fields

NameDescription
const TypeToolKeyThe type tool info key.

Examples

The following code demonstrates the support of VstkResource resource.

[C#]

string srcFile = "StrokeShapeTest1.psd";
string dstFile = "StrokeShapeTest2.psd";

using (PsdImage image = (PsdImage)Image.Load(srcFile))
{
    Layer layer = image.Layers[1];
    foreach (LayerResource resource in layer.Resources)
    {
        if (resource is VstkResource)
        {
            VstkResource vstkResource = (VstkResource)resource;
            vstkResource.StrokeStyleLineAlignment = StrokePosition.Outside;
            vstkResource.StrokeStyleLineWidth = 20;
        }
    }

    image.Save(dstFile);
}

See Also