From c6dbcedddb64bef745706725538e79f8491924a1 Mon Sep 17 00:00:00 2001 From: Alan Trebugeais Date: Fri, 8 May 2026 23:41:40 +0200 Subject: [PATCH] add: drawIcons in the documentation of EXTENSION.md --- EXTENSIONS.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/EXTENSIONS.md b/EXTENSIONS.md index b0c59b94..1104e952 100644 --- a/EXTENSIONS.md +++ b/EXTENSIONS.md @@ -230,8 +230,27 @@ api.getActiveFrame(); api.isExtensionActive(extensionId); api.getPlaybackState(); api.getCanvasDimensions(); +api.drawIcon(ctx, "Sparkle", 100, 100, 20, "#2563EB", "regular"); ``` +### Drawing Icons + +Extensions can draw icons from Recordly's bundled Phosphor icon set directly on a canvas context: + +```js +api.drawIcon( + ctx, + "ArrowClockwise", // icon name from @phosphor-icons/react + 120, // x (center) + 80, // y (center) + 18, // size in px + "#ffffff", // color + "bold", // optional weight: thin | light | regular | bold | fill +); +``` + +This is useful for lightweight overlays and avoids bundling your own icon assets. + ## Settings Panels ```js