aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/global
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-08-18 11:55:29 -0400
committerbobzel <zzzman@gmail.com>2025-08-18 11:55:29 -0400
commit8f1d7c28739270f40d97258cb4e6fbe5c20a5865 (patch)
tree03e3bf8130810d3ce21ea952a2ed0ad3bbad4808 /src/client/views/global
parent1577b92b3d66a26c0df45db9122b47be809ebe83 (diff)
added image foreground mask function. added ui buttons for removing background, masking foreground.HEADmaster
Diffstat (limited to 'src/client/views/global')
-rw-r--r--src/client/views/global/globalScripts.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/views/global/globalScripts.ts b/src/client/views/global/globalScripts.ts
index e098d50d8..981c4d111 100644
--- a/src/client/views/global/globalScripts.ts
+++ b/src/client/views/global/globalScripts.ts
@@ -553,6 +553,16 @@ ScriptingGlobals.add(function videoSnapshot() {
});
// eslint-disable-next-line prefer-arrow-callback
+ScriptingGlobals.add(function imageMaskForeground() {
+ const selected = DocumentView.Selected().lastElement()?.ComponentView as ImageBox;
+ selected?.maskForeground();
+});
+// eslint-disable-next-line prefer-arrow-callback
+ScriptingGlobals.add(function imageRemoveBackground() {
+ const selected = DocumentView.Selected().lastElement()?.ComponentView as ImageBox;
+ selected?.removeBackground();
+});
+// eslint-disable-next-line prefer-arrow-callback
ScriptingGlobals.add(function imageSetPixelSize() {
const selected = DocumentView.Selected().lastElement()?.ComponentView as ImageBox;
selected?.setNativeSize();