mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-24 14:55:37 +00:00
add: drawIcons in the documentation of EXTENSION.md
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user