Type Definitions
Area
Area object.
{left: number, top: number, right: number, bottom: number}
Name | Type | Description |
---|---|---|
left | number | Left coordinate |
top | number | Top coordinate |
right | number | Right coordinate |
bottom | number | Bottom coordinate |
BBox
Bounding box object.
{x: number, y: number, width: number, height: number}
Name | Type | Description |
---|---|---|
x | number | X coordinate |
y | number | Y coordinate |
width | number | Width of bounding box |
height | number | Height of bounding box |
Intersect
Intersect object.
{pts: Point[], ts1: number[], ts2: number[]}
Name | Type | Description |
---|---|---|
pts | Point[] | An array of intersected points, or an empty array if no intersections. |
ts | Array.<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}
Name | Type | Attributes | Description |
---|---|---|---|
type | string | Valid svg path command limited to M, L, C, Q, Z | |
x | number | X coordinate | |
y | number | Y coordinate | |
x1 | number | optional | X control point for quadratic and bezier curve |
y1 | number | optional | Y control point for quadratic and bezier curve |
x2 | number | optional | Second X control point for bezier curve |
y2 | number | optional | Second Y control point for bezier curve |
length | number | The number of items in the path segment list |
Point
Point object.
{x: number, y: number}
Name | Type | Description |
---|---|---|
x | number | X coordinate |
y | number | Y coordinate |
Methods
.batchUpdate(path, json) Returns: *
Batch update to remedy the "Write too large" error on Firebase
Name | Type | Description |
---|---|---|
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