Global

Global

Type Definitions

Area

Area object.

{left: number, top: number, right: number, bottom: number}

NameTypeDescription
leftnumber

Left coordinate

topnumber

Top coordinate

rightnumber

Right coordinate

bottomnumber

Bottom coordinate

BBox

Bounding box object.

{x: number, y: number, width: number, height: number}

NameTypeDescription
xnumber

X coordinate

ynumber

Y coordinate

widthnumber

Width of bounding box

heightnumber

Height of bounding box

Intersect

Intersect object.

{pts: Point[], ts1: number[], ts2: number[]}

NameTypeDescription
ptsPoint[]

An array of intersected points, or an empty array if no intersections.

tsArray.<number[]>

Two arrays (0 === first segment, 1 === second segment) of T values for the intersected points.

PathList

Path segment list. Contains an array of objects in the following format:

{type: string, x: number, y: number, x1: number, y1: number, x2: number, y2: number}

NameTypeAttributesDescription
typestring

Valid svg path command limited to M, L, C, Q, Z

xnumber

X coordinate

ynumber

Y coordinate

x1numberoptional

X control point for quadratic and bezier curve

y1numberoptional

Y control point for quadratic and bezier curve

x2numberoptional

Second X control point for bezier curve

y2numberoptional

Second Y control point for bezier curve

lengthnumber

The number of items in the path segment list

Point

Point object.

{x: number, y: number}

NameTypeDescription
xnumber

X coordinate

ynumber

Y coordinate

Methods

.batchUpdate(path, json) Returns: *

Batch update to remedy the "Write too large" error on Firebase

NameTypeDescription
path

Path to data

json

Update json object

.preparePages() Returns: *

returns a Promise with an array of Vecta.Page as return value. also prepares Vecta.activeDoc and Vecta.activePage and v.pages to be used by export functions later

Capital™ Electra™ X