ISafetyLine Interface

A structure holding settings for a safety line. For details, see the Safety Lines and Crop Marks topic.

example
// Defining the product.
var w = 720, h = 504; // 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)',
                borderRadius: "10",
                stepPx: 5,
                widthPx: 1 
            }]
        }]
    }]
};

Properties

Optional altColor

altColor: string

The alternate color; a CSS-style color value. The default value is "rgba(0,0,0,255)".

Optional borderRadius

borderRadius: string

The definition of rounded corners in the CSS format. You can set up the radius in points, in percent, or through the width and height of ellipses. By default, the safety zone is not rounded.

Optional color

color: string

The main color; a CSS-style color value. The default value is "rgba(255,255,255,255)".

Optional leftRightMargin

leftRightMargin: number

The left and right margins - 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 | object

The margin is the distance between a safety line and the print area bounds. The default value is 10.

horizontal

The horizontal distance between safety lines and print area bounds.

vertical

The vertical distance between safety lines and print area bounds.

Optional name

name: string

The name of the safety line.

Optional stepPx

stepPx: number

The dash length in pixels; the safety line is always a dashed line. The default value is 10px.

Optional topBottomMargin

topBottomMargin: number

The top and bottom margins - 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

The line width, in pixels. The default value is 1px.