Skip to content

Outline

Unofficial

Represents an SVG outline path for PDF annotations.

Import:

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

Signature:

export class Outline

Properties

Property Type Description
PRECISION number Number of decimal places used when rounding SVG coordinates.

Methods

Method Returns Description
_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) unknown Rescale coordinates by translation and scale factors.
_rescaleAndSwap(src, tx, ty, sx, sy, dest) unknown Rescale and swap coordinates by translation and scale factors.
_translate(src, tx, ty, dest) unknown Translate coordinates by the given offsets.
createBezierPoints(x1, y1, x2, y2, x3, y3) number[] Create cubic bezier control points between two endpoints.
serialize(bbox, rotation) void Serialize the outline into the PDF page coordinate system.
svgRound(x) number Round a number to the configured SVG precision.
toSVGPath() string Converts the outline to an SVG path.

Links to this page: