add: drawIcons in the documentation of EXTENSION.md

This commit is contained in:
Alan Trebugeais
2026-05-08 23:41:40 +02:00
parent d2740786fc
commit c6dbcedddb
+19
View File
@@ -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