ISafetyLine

A structure holding settings for a safety line. See the Safety Lines topic for details.

example
// Defining a product.
var w = 640, h = 480; // in points (1 point = 1/72 inch)

var emptyProduct = {
    surfaces: [
        {
            width: w,
            height: h,
            printAreas: [{
                bounds: {
                    x: 0,
                    y: 0,
                    width: w,
                    height: h
                },
                safetyLines: [{
                    margin: 8.5,
                    color: 'rgba(0,255,0,255)',
                    stepPx: 5,
                    widthPx: 1 
                }]
            }],
        }]
};

Properties

Optional altColor

altColor: string

Alternative color; CSS-style color value.

Optional color

color: string

Main color; CSS-style color value.

Optional leftRightMargin

leftRightMargin: number

Left and right margin - the distance of a safety line from the left and right borders of the print area. If it is not set, then the margin value is used.

Optional margin

margin: number

Margin - the distance of a safety line from the print area.

Optional name

name: string

Name of the safety line.

Optional stepPx

stepPx: number

Dash length in pixels; the safety line is always a dashed line.

Optional topBottomMargin

topBottomMargin: number

Top and bottom margin - the distance of a safety line from the top and bottom borders of the print area. If it is not set, then the margin value is used.

Optional widthPx

widthPx: number

Line width in pixels.