Skip to content

Outline

Unofficial

Represents an SVG outline path for PDF annotations.

Import:

import type { Outline } from '@obsidian-typings/obsidian-public-latest';

Signature:

export class Outline

Properties

PropertyTypeDescription
PRECISIONnumberNumber of decimal places used when rounding SVG coordinates.

Methods

MethodReturnsDescription
_normalizePagePoint(x, y, rotation)unknown[]Normalize a point relative to the page with the given rotation.
_normalizePoint(x, y, parentWidth, parentHeight, rotation)number[]Normalize a point relative to a parent element with the given dimensions and rotation.
_rescale(src, tx, ty, sx, sy, dest)unknownRescale coordinates by translation and scale factors.
_rescaleAndSwap(src, tx, ty, sx, sy, dest)unknownRescale and swap coordinates by translation and scale factors.
_translate(src, tx, ty, dest)unknownTranslate coordinates by the given offsets.
createBezierPoints(x1, y1, x2, y2, x3, y3)number[]Create cubic bezier control points between two endpoints.
serialize(bbox, rotation)voidSerialize the outline into the PDF page coordinate system.
svgRound(x)numberRound a number to the configured SVG precision.
toSVGPath()stringConverts the outline to an SVG path.

Links to this page: