ISurfaceFromState Interface

A structure holding settings to create a surface from a state file.

example
const productDefinition = {
    surfaces: [{
        // Initialize a surface through a state file.
        stateId: "ed867273-5679-4927-b718-a53e92d6802c",
        // Select a surface index in the state file.
        surface: 2,
        // Apply a background mockup to the surface.
        mockup: {
            down: "tshirt"
        },
        // Specify the design location relative to the mockup.
        location: { x: 120, y: 0 }
    }]
};

Properties

Optional bgFoldingMode

bgFoldingMode: IBgFoldingModeParams

Parameters of the background folding mode.

Optional containers

A collection of channel containers. For more details, refer to the Spot Colors and Textures topic.

Optional foldingLines

foldingLines: IFoldingLine []

A collection of folding lines defined in the surface (page).

Optional location

location: IPointF

Coordinates of the design relative to the upper-left corner of the mockup, in points.

Optional mockup

A mockup applied to the surface.

Optional name

name: string

A name of a surface (a page) in the product.

Optional previewMockups

previewMockups: IMockupTemplate []

A collection of preview mockups for proof images.

Optional printAreas

A collection of print areas defined in the surface (page).

Optional proofImage

proofImage: IProofImage

Settings of proof images.

Optional spines

spines: ISpine []

A collection of spines defined in the surface (page).

stateId

stateId: string

The name of a state file.

Optional surface

surface: number

A surface index in the state file. The default value is 0 that stands for the first surface.