Skip to content

editor / freeShapeWithMidpoint

Function: freeShapeWithMidpoint() ​

freeShapeWithMidpoint(shape, edge): FreeShape

Defined in: model/free-shape-with-midpoint.ts:23

Free shape with a sharp point added in the middle of an edge, right after the edge's first point: the points after it are numbered one more, point 1 stays point 1 (F08.AC3). The point lies on the straight edge, so the outline keeps its place and its box; it keeps its fractions. On a shape of width or height 0 the result is not valid (isValidFreeShape).

Parameters ​

shape ​

FreeShape

free shape, straight or turned

edge ​

number

number of the edge, the one of its first point, from 0

Returns ​

FreeShape

the free shape with one more point, its box placed so that the other points stay where they are drawn

Kind ​

domain

See ​

REF-INKSCAPE-NODE-OPS