From 516dc9740b096dde696da551597c48411cc82de7 Mon Sep 17 00:00:00 2001 From: Project Econome <108093514+Project-Econome@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:13:23 +0000 Subject: [PATCH] update 2.1.0 0 --- dist/classes/builder.d.ts | 19 ++++++++++---- dist/classes/builder.d.ts.map | 2 +- dist/classes/builder.js | 30 ++++++++++++++++------ dist/classes/builder.js.map | 2 +- dist/functions/clearRect.d.ts | 2 +- dist/functions/clearRect.d.ts.map | 2 +- dist/functions/clearRect.js | 14 +++++------ dist/functions/clearRect.js.map | 2 +- dist/functions/drawImage.d.ts | 2 +- dist/functions/drawImage.d.ts.map | 2 +- dist/functions/drawImage.js | 4 +-- dist/functions/drawImage.js.map | 2 +- dist/functions/fillRect.d.ts | 2 +- dist/functions/fillRect.d.ts.map | 2 +- dist/functions/fillRect.js | 4 +-- dist/functions/fillRect.js.map | 2 +- dist/functions/strokeRect.d.ts | 2 +- dist/functions/strokeRect.d.ts.map | 2 +- dist/functions/strokeRect.js | 4 +-- dist/functions/strokeRect.js.map | 2 +- dist/functions/textBaseline.d.ts | 18 ++++++++++++++ dist/functions/textBaseline.d.ts.map | 1 + dist/functions/textBaseline.js | 37 ++++++++++++++++++++++++++++ dist/functions/textBaseline.js.map | 1 + dist/index.js | 2 +- package.json | 2 +- src/classes/builder.ts | 11 +++++++-- src/functions/clearRect.ts | 21 ++++++++++------ src/functions/drawImage.ts | 12 +++++++-- src/functions/fillRect.ts | 12 +++++++-- src/functions/strokeRect.ts | 12 +++++++-- src/functions/textBaseline.ts | 37 ++++++++++++++++++++++++++++ 32 files changed, 213 insertions(+), 56 deletions(-) create mode 100644 dist/functions/textBaseline.d.ts create mode 100644 dist/functions/textBaseline.d.ts.map create mode 100644 dist/functions/textBaseline.js create mode 100644 dist/functions/textBaseline.js.map create mode 100644 src/functions/textBaseline.ts diff --git a/dist/classes/builder.d.ts b/dist/classes/builder.d.ts index bac7fc1..ec2a66d 100644 --- a/dist/classes/builder.d.ts +++ b/dist/classes/builder.d.ts @@ -28,11 +28,19 @@ export declare enum Filter { saturate = 7 } export declare enum textAlign { - start = 0, - right = 1, - center = 2, - left = 3, - end = 4 + start = "end", + left = "right", + center = "center", + right = "left", + end = "start" +} +export declare enum textBaseline { + alphabetic = 0, + bottom = 1, + hanging = 2, + ideographic = 3, + middle = 4, + top = 5 } export declare enum MeasureTextProperty { actualBoundingBoxAscent = 0, @@ -65,6 +73,7 @@ export declare class CanvasBuilder { setShadow: (blur: number, color: number, offset?: number | number[]) => typeof CanvasBuilder; trim: () => typeof CanvasBuilder; setTextAlign: (align: textAlign) => typeof CanvasBuilder; + setTextBaseline: (baseline: textBaseline) => typeof CanvasBuilder; measureText: (text: string, font: string) => TextMetrics | undefined; rotate: (angle: number) => typeof CanvasBuilder; resize: (width: number, height: number) => typeof CanvasBuilder; diff --git a/dist/classes/builder.d.ts.map b/dist/classes/builder.d.ts.map index fced66f..dae2acb 100644 --- a/dist/classes/builder.d.ts.map +++ b/dist/classes/builder.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/classes/builder.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAA2B,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,oBAAY,QAAQ;IAAG,GAAG,IAAA;IAAE,GAAG,IAAA;CAAE;AACjC,oBAAY,aAAa;IAAG,KAAK,IAAA;IAAE,MAAM,IAAA;CAAE;AAC3C,oBAAY,YAAY;IAAG,GAAG,IAAA;IAAE,GAAG,IAAA;IAAE,MAAM,IAAA;IAAE,KAAK,IAAA;IAAE,GAAG,IAAA;IAAE,KAAK,IAAA;CAAE;AAChE,oBAAY,MAAM;IAAG,IAAI,IAAA;IAAE,IAAI,IAAA;IAAE,KAAK,IAAA;IAAE,SAAS,IAAA;IAAE,UAAU,IAAA;IAAE,QAAQ,IAAA;IAAE,MAAM,IAAA;I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,WAAW,MAAM,GAAG,MAAM,EAAE,0BAiBzE;IAEK,IAAI,6BAoCT;IAEK,YAAY,UAAW,SAAS,0BAGrC;IAEK,eAAe,aAAc,YAAY,0BAG9C;IAEK,WAAW,SAAU,MAAM,QAAQ,MAAM,6BAiB9C;IAEK,MAAM,UAAW,MAAM,0BAU5B;IAEK,MAAM,UAAW,MAAM,UAAU,MAAM,0BAS5C;IAEK,UAAU,sBAA2B;IACrC,MAAM,eAAwD;CACtE"} \ No newline at end of file diff --git a/dist/classes/builder.js b/dist/classes/builder.js index 4f22caa..2df5014 100644 --- a/dist/classes/builder.js +++ b/dist/classes/builder.js @@ -1,8 +1,9 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.CanvasBuilder = exports.MeasureTextProperty = exports.textAlign = exports.Filter = exports.FilterMethod = exports.WidthOrHeight = exports.GetOrSet = void 0; +exports.CanvasBuilder = exports.MeasureTextProperty = exports.textBaseline = exports.textAlign = exports.Filter = exports.FilterMethod = exports.WidthOrHeight = exports.GetOrSet = void 0; const canvas_1 = require("@napi-rs/canvas"); const util_1 = require("./util"); +// Enums var GetOrSet; (function (GetOrSet) { GetOrSet[GetOrSet["get"] = 0] = "get"; @@ -39,13 +40,23 @@ var Filter; ; var textAlign; (function (textAlign) { - textAlign[textAlign["start"] = 0] = "start"; - textAlign[textAlign["right"] = 1] = "right"; - textAlign[textAlign["center"] = 2] = "center"; - textAlign[textAlign["left"] = 3] = "left"; - textAlign[textAlign["end"] = 4] = "end"; + textAlign["start"] = "end"; + textAlign["left"] = "right"; + textAlign["center"] = "center"; + textAlign["right"] = "left"; + textAlign["end"] = "start"; })(textAlign || (exports.textAlign = textAlign = {})); ; +var textBaseline; +(function (textBaseline) { + textBaseline[textBaseline["alphabetic"] = 0] = "alphabetic"; + textBaseline[textBaseline["bottom"] = 1] = "bottom"; + textBaseline[textBaseline["hanging"] = 2] = "hanging"; + textBaseline[textBaseline["ideographic"] = 3] = "ideographic"; + textBaseline[textBaseline["middle"] = 4] = "middle"; + textBaseline[textBaseline["top"] = 5] = "top"; +})(textBaseline || (exports.textBaseline = textBaseline = {})); +; var MeasureTextProperty; (function (MeasureTextProperty) { MeasureTextProperty[MeasureTextProperty["actualBoundingBoxAscent"] = 0] = "actualBoundingBoxAscent"; @@ -60,6 +71,7 @@ var MeasureTextProperty; MeasureTextProperty[MeasureTextProperty["width"] = 9] = "width"; })(MeasureTextProperty || (exports.MeasureTextProperty = MeasureTextProperty = {})); ; +// The builder itself class CanvasBuilder { static ctx; static util = util_1.CanvasUtil; @@ -267,7 +279,11 @@ class CanvasBuilder { return CanvasBuilder; }; setTextAlign = (align) => { - CanvasBuilder.ctx.textAlign = (textAlign[4 - align] ?? textAlign.left); + CanvasBuilder.ctx.textAlign = align; + return CanvasBuilder; + }; + setTextBaseline = (baseline) => { + CanvasBuilder.ctx.textBaseline = textBaseline[baseline]; return CanvasBuilder; }; measureText = (text, font) => { diff --git a/dist/classes/builder.js.map b/dist/classes/builder.js.map index a38df9d..c8a244a 100644 --- a/dist/classes/builder.js.map +++ b/dist/classes/builder.js.map @@ -1 +1 @@ -{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/classes/builder.ts"],"names":[],"mappings":";;;AAAA,4CAAgF;AAChF,iCAAoC;AAEpC,IAAY,QAAqB;AAAjC,WAAY,QAAQ;IAAG,qCAAG,CAAA;IAAE,qCAAG,CAAA;AAAC,CAAC,EAArB,QAAQ,wBAAR,QAAQ,QAAa;AAAA,CAAC;AAClC,IAAY,aAA+B;AAA3C,WAAY,aAAa;IAAG,mDAAK,CAAA;IAAE,qDAAM,CAAA;AAAC,CAAC,EAA/B,aAAa,6BAAb,aAAa,QAAkB;AAAA,CAAC;AAC5C,IAAY,YAAoD;AAAhE,WAAY,YAAY;IAAG,6CAAG,CAAA;IAAE,6CAAG,CAAA;IAAE,mDAAM,CAAA;IAAE,iDAAK,CAAA;IAAE,6CAAG,CAAA;IAAE,iDAAK,CAAA;AAAC,CAAC,EAApD,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;QAEjC,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACtB,GAAG,CAAC,MAAM,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;QACpC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;QAExB,OAAO,aAAa,CAAC;IACvB,CAAC,CAAC;IAEK,MAAM,GAAG,CAAC,KAAa,EAAE,MAAc,EAAE,EAAE;QAChD,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,EACvB,IAAI,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEzE,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;QAC3B,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAE7B,OAAO,aAAa,CAAC;IACvB,CAAC,CAAC;IAEK,UAAU,GAAG,GAAG,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC;IACrC,MAAM,GAAG,GAAG,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;;AApUvE,sCAqUC;AAAA,CAAC"} \ No newline at end of file diff --git a/dist/functions/clearRect.d.ts b/dist/functions/clearRect.d.ts index 3057184..de29fa0 100644 --- a/dist/functions/clearRect.d.ts +++ b/dist/functions/clearRect.d.ts @@ -32,7 +32,7 @@ declare const _default: NativeFunction<[{ }, { name: string; description: string; - rest: false; + rest: true; type: ArgType.Number; required: false; }], true>; diff --git a/dist/functions/clearRect.d.ts.map b/dist/functions/clearRect.d.ts.map index a18e017..862604a 100644 --- a/dist/functions/clearRect.d.ts.map +++ b/dist/functions/clearRect.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"clearRect.d.ts","sourceRoot":"","sources":["../../src/functions/clearRect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG/D,wBA4DG"} \ No newline at end of file +{"version":3,"file":"clearRect.d.ts","sourceRoot":"","sources":["../../src/functions/clearRect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG/D,wBAmEG"} \ No newline at end of file diff --git a/dist/functions/clearRect.js b/dist/functions/clearRect.js index 4c66935..d38e4b2 100644 --- a/dist/functions/clearRect.js +++ b/dist/functions/clearRect.js @@ -47,17 +47,17 @@ exports.default = new forgescript_1.NativeFunction({ { name: "radius", description: "The rect corners radius.", - rest: false, + rest: true, type: forgescript_1.ArgType.Number, required: false } ], - execute(ctx, [canvas, x, y, width, height, radius]) { - canvas = canvas?.trim(); - const canvs = ctx.getEnvironmentKey(`canvas_${canvas}`); - if (!canvs || !(canvs instanceof classes_1.CanvasBuilder)) - return this.customError(`There's no such canvas named '${canvas}'`); - canvs.clearRect(x, y, width, height); + execute(ctx, [name, x, y, width, height, radius]) { + name = name?.trim(); + const canvas = ctx.getEnvironmentKey(`canvas_${name}`); + if (!canvas || !(canvas instanceof classes_1.CanvasBuilder)) + return this.customError(`There's no such canvas named '${name}'`); + canvas.clearRect(x, y, width, height, radius && radius.length === 1 ? radius[0] : radius); return this.success(); } }); diff --git a/dist/functions/clearRect.js.map b/dist/functions/clearRect.js.map index 474d741..0936928 100644 --- a/dist/functions/clearRect.js.map +++ b/dist/functions/clearRect.js.map @@ -1 +1 @@ -{"version":3,"file":"clearRect.js","sourceRoot":"","sources":["../../src/functions/clearRect.ts"],"names":[],"mapp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I,EAAE,CAAC;QAExB,MAAM,KAAK,GAAG,GAAG,CAAC,iBAAiB,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,YAAY,uBAAa,CAAC;YAC3C,OAAO,IAAI,CAAC,WAAW,CAAC,iCAAiC,MAAM,GAAG,CAAC,CAAC;QAExE,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACJ,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"clearRect.js","sourceRoot":"","sources":["../../src/functions/clearRect.ts"],"names":[],"mappings":";;AAAA,uDAA+D;AAC/D,wCAA0C;AAE1C,kBAAe,IAAI,4BAAc,CAAC;IAC9B,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,wCAAwC;IACrD,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE;QACF;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,6CAA6C;YAC1D,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,KAAK;SAClB;KACJ;IACD,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;QAC5C,IAAI,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC;QAEpB,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,YAAY,uBAAa,CAAC;YAC7C,OAAO,IAAI,CAAC,WAAW,CAAC,iCAAiC,IAAI,GAAG,CAAC,CAAC;QAEtE,MAAM,CAAC,SAAS,CACZ,CAAC,EACD,CAAC,EACD,KAAK,EACL,MAAM,EACN,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CACrD,CAAC;QAEF,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/functions/drawImage.d.ts b/dist/functions/drawImage.d.ts index 57b0910..0101ead 100644 --- a/dist/functions/drawImage.d.ts +++ b/dist/functions/drawImage.d.ts @@ -38,7 +38,7 @@ declare const _default: NativeFunction<[{ }, { name: string; description: string; - rest: false; + rest: true; type: ArgType.Number; required: false; }], true>; diff --git a/dist/functions/drawImage.d.ts.map b/dist/functions/drawImage.d.ts.map index 1dcaf42..9e1368f 100644 --- a/dist/functions/drawImage.d.ts.map +++ b/dist/functions/drawImage.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"drawImage.d.ts","sourceRoot":"","sources":["../../src/functions/drawImage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG/D,wBAmEG"} \ No newline at end of file +{"version":3,"file":"drawImage.d.ts","sourceRoot":"","sources":["../../src/functions/drawImage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG/D,wBA2EG"} \ No newline at end of file diff --git a/dist/functions/drawImage.js b/dist/functions/drawImage.js index da7c1bc..7c87d13 100644 --- a/dist/functions/drawImage.js +++ b/dist/functions/drawImage.js @@ -53,7 +53,7 @@ exports.default = new forgescript_1.NativeFunction({ { name: "radius", description: "The radius of image corners.", - rest: false, + rest: true, type: forgescript_1.ArgType.Number, required: false } @@ -64,7 +64,7 @@ exports.default = new forgescript_1.NativeFunction({ const canvs = ctx.getEnvironmentKey(`canvas_${canvas}`); if (!canvs || !(canvs instanceof classes_1.CanvasBuilder)) return this.customError(`There's no such canvas named '${canvas}'`); - await canvs.drawImage(path, x, y, width ?? undefined, height ?? undefined, radius ?? undefined); + await canvs.drawImage(path, x, y, width ?? undefined, height ?? undefined, radius && radius.length === 1 ? radius[0] : radius); return this.success(); } }); diff --git a/dist/functions/drawImage.js.map b/dist/functions/drawImage.js.map index 9d4ceb1..5cd8c2b 100644 --- a/dist/functions/drawImage.js.map +++ b/dist/functions/drawImage.js.map @@ -1 +1 @@ -{"version":3,"file":"drawImage.js","sourceRoot":"","sources":["../../src/functions/drawImage.ts"],"names":[],"mappings":";;AAAA,uDAA+D;AAC/D,wCAA0C;AAE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,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;QAC1D,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,CAAC;QAExB,MAAM,KAAK,GAAG,GAAG,CAAC,iBAAiB,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,YAAY,uBAAa,CAAC;YAC3C,OAAO,IAAI,CAAC,WAAW,CAAC,iCAAiC,MAAM,GAAG,CAAC,CAAC;QAExE,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,IAAI,SAAS,CAAC,CAAC;QAChG,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACJ,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"drawImage.js","sourceRoot":"","sources":["../../src/functions/drawImage.ts"],"names":[],"mappings":";;AAAA,uDAA+D;AAC/D,wCAA0C;AAE1C,kBAAe,IAAI,4BAAc,CAAC;IAC9B,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,0BAA0B;IACvC,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE;QACF;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,wDAAwD;YACrE,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,8BAA8B;YAC3C,IAAI,EAAE,KAAK;YACX,IAA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AC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CACrD,CAAC;QAEF,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/functions/fillRect.d.ts b/dist/functions/fillRect.d.ts index 1d5e934..329cc9a 100644 --- a/dist/functions/fillRect.d.ts +++ b/dist/functions/fillRect.d.ts @@ -38,7 +38,7 @@ declare const _default: NativeFunction<[{ }, { name: string; description: string; - rest: false; + rest: true; type: ArgType.Number; required: false; }], true>; diff --git a/dist/functions/fillRect.d.ts.map b/dist/functions/fillRect.d.ts.map index dd9e3c7..8afc187 100644 --- a/dist/functions/fillRect.d.ts.map +++ b/dist/functions/fillRect.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"fillRect.d.ts","sourceRoot":"","sources":["../../src/functions/fillRect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG/D,wBAmEG"} \ No newline at end of file +{"version":3,"file":"fillRect.d.ts","sourceRoot":"","sources":["../../src/functions/fillRect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG/D,wBA2EG"} \ No newline at end of file diff --git a/dist/functions/fillRect.js b/dist/functions/fillRect.js index 96f57ad..5eb8e24 100644 --- a/dist/functions/fillRect.js +++ b/dist/functions/fillRect.js @@ -54,7 +54,7 @@ exports.default = new forgescript_1.NativeFunction({ { name: "radius", description: "The rect corners radius.", - rest: false, + rest: true, type: forgescript_1.ArgType.Number, required: false } @@ -64,7 +64,7 @@ exports.default = new forgescript_1.NativeFunction({ const canvs = ctx.getEnvironmentKey(`canvas_${canvas}`); if (!canvs || !(canvs instanceof classes_1.CanvasBuilder)) return this.customError(`There's no such canvas named '${canvas}'`); - canvs.fillRect(color, x, y, width, height, radius ?? undefined); + canvs.fillRect(color, x, y, width, height, radius && radius.length === 1 ? radius[0] : radius); return this.success(); } }); diff --git a/dist/functions/fillRect.js.map b/dist/functions/fillRect.js.map index ac90f46..1615d60 100644 --- a/dist/functions/fillRect.js.map +++ b/dist/functions/fillRect.js.map @@ -1 +1 @@ -{"version":3,"file":"fillRect.js","sourceRoot":"","sources":["../../src/functions/fillRect.ts"],"names":[],"mappings":";;AAAA,uDAA+D;AAC/D,wCAA0C;AAE1C,kBAAe,IAAI,4BAAc,CAAC;IAC9B,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,kCAAkC;IAC/C,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE;QACF;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qCAAqC;YAClD,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,KAAK;YACnB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CA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AE,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,YAAY,uBAAa,CAAC;YAC3C,OAAO,IAAI,CAAC,WAAW,CAAC,iCAAiC,MAAM,GAAG,CAAC,CAAC;QAExE,KAAK,CAAC,QAAQ,CACV,KAAK,EACL,CAAC,EACD,CAAC,EACD,KAAK,EACL,MAAM,EACN,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CACrD,CAAC;QAEF,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/functions/strokeRect.d.ts b/dist/functions/strokeRect.d.ts index cddd241..577bae2 100644 --- a/dist/functions/strokeRect.d.ts +++ b/dist/functions/strokeRect.d.ts @@ -44,7 +44,7 @@ declare const _default: NativeFunction<[{ }, { name: string; description: string; - rest: false; + rest: true; type: ArgType.Number; required: false; }], true>; diff --git a/dist/functions/strokeRect.d.ts.map b/dist/functions/strokeRect.d.ts.map index 36b60ad..28e6786 100644 --- a/dist/functions/strokeRect.d.ts.map +++ b/dist/functions/strokeRect.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"strokeRect.d.ts","sourceRoot":"","sources":["../../src/functions/strokeRect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG/D,wBA2EG"} \ No newline at end of file +{"version":3,"file":"strokeRect.d.ts","sourceRoot":"","sources":["../../src/functions/strokeRect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG/D,wBAmFG"} \ No newline at end of file diff --git a/dist/functions/strokeRect.js b/dist/functions/strokeRect.js index 7adf184..3cd16a7 100644 --- a/dist/functions/strokeRect.js +++ b/dist/functions/strokeRect.js @@ -61,7 +61,7 @@ exports.default = new forgescript_1.NativeFunction({ { name: "radius", description: "The rect corners radius.", - rest: false, + rest: true, type: forgescript_1.ArgType.Number, required: false } @@ -71,7 +71,7 @@ exports.default = new forgescript_1.NativeFunction({ const canvs = ctx.getEnvironmentKey(`canvas_${canvas}`); if (!canvs || !(canvs instanceof classes_1.CanvasBuilder)) return this.customError(`There's no such canvas named '${canvas}'`); - canvs.strokeRect(color, x, y, width, height, lineWidth ?? undefined, radius ?? undefined); + canvs.strokeRect(color, x, y, width, height, lineWidth ?? undefined, radius && radius.length === 1 ? radius[0] : radius); return this.success(); } }); diff --git a/dist/functions/strokeRect.js.map b/dist/functions/strokeRect.js.map index 7c5b569..8d15ab9 100644 --- a/dist/functions/strokeRect.js.map +++ b/dist/functions/strokeRect.js.map @@ -1 +1 @@ -{"version":3,"file":"strokeRect.js","sourceRoot":"","sources":["../../src/functions/strokeRect.ts"],"names":[],"mappings":";;AAAA,uDAA+D;AAC/D,wCAA0C;AAE1C,kBAAe,IAAI,4BAAc,CAAC;IAC9B,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,yCAAyC;IACtD,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE;QACF;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qCAAqC;YAClD,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,KAAK;YACnB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,GAAG;YACT,WAAW,EAAE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QAExE,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,IAAI,SAAS,EAAE,MAAM,IAAI,SAAS,CAAC,CAAC;QAE1F,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACJ,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"strokeRect.js","sourceRoot":"","sources":["../../src/functions/strokeRect.ts"],"names":[],"mappings":";;AAAA,uDAA+D;AAC/D,wCAA0C;AAE1C,kBAAe,IAAI,4BAAc,CAAC;IAC9B,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,yCAAyC;IACtD,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE;QACF;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qCAAqC;YAClD,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,KAAK;YACnB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,KAAK;SAClB;QACD;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,KAAK;SAClB;KACJ;IACD,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC;QAChE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,CAAC;QAExB,MAAM,KAAK,GAAG,GAAG,CAAC,iBAAiB,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,YAAY,uBAAa,CAAC;YAC3C,OAAO,IAAI,CAAC,WAAW,CAAC,iCAAiC,MAAM,GAAG,CAAC,CAAC;QAExE,KAAK,CAAC,UAAU,CACZ,KAAK,EACL,CAAC,EACD,CAAC,EACD,KAAK,EACL,MAAM,EACN,SAAS,IAAI,SAAS,EACtB,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CACrD,CAAC;QAEF,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/functions/textBaseline.d.ts b/dist/functions/textBaseline.d.ts new file mode 100644 index 0000000..d2d0692 --- /dev/null +++ b/dist/functions/textBaseline.d.ts @@ -0,0 +1,18 @@ +import { ArgType, NativeFunction } from "@tryforge/forgescript"; +import { textBaseline } from "../classes"; +declare const _default: NativeFunction<[{ + name: string; + description: string; + rest: false; + type: ArgType.String; + required: true; +}, { + name: string; + description: string; + rest: false; + type: ArgType.Enum; + enum: typeof textBaseline; + required: true; +}], true>; +export default _default; +//# sourceMappingURL=textBaseline.d.ts.map \ No newline at end of file diff --git a/dist/functions/textBaseline.d.ts.map b/dist/functions/textBaseline.d.ts.map new file mode 100644 index 0000000..2f277e7 --- /dev/null +++ b/dist/functions/textBaseline.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"textBaseline.d.ts","sourceRoot":"","sources":["../../src/functions/textBaseline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAA4B,YAAY,EAAE,MAAM,YAAY,CAAC;;;;;;;;;;;;;;;AAEpE,wBAiCG"} \ No newline at end of file diff --git a/dist/functions/textBaseline.js b/dist/functions/textBaseline.js new file mode 100644 index 0000000..a873551 --- /dev/null +++ b/dist/functions/textBaseline.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const forgescript_1 = require("@tryforge/forgescript"); +const classes_1 = require("../classes"); +exports.default = new forgescript_1.NativeFunction({ + name: "$textBaseline", + version: "1.0.0", + description: "Sets text baseline in a canvas.", + unwrap: true, + brackets: true, + args: [ + { + name: "canvas", + description: "The name of canvas to set text baseline in.", + rest: false, + type: forgescript_1.ArgType.String, + required: true + }, + { + name: "baseline", + description: "Text baseline.", + rest: false, + type: forgescript_1.ArgType.Enum, + enum: classes_1.textBaseline, + required: true + } + ], + execute(ctx, [canvas, baseline]) { + canvas = canvas?.trim(); + const canvs = ctx.getEnvironmentKey(`canvas_${canvas}`); + if (!canvs || !(canvs instanceof classes_1.CanvasBuilder)) + return this.customError(`There's no such canvas named '${canvas}'`); + canvs.setTextBaseline(baseline); + return this.success(); + } +}); +//# sourceMappingURL=textBaseline.js.map \ No newline at end of file diff --git a/dist/functions/textBaseline.js.map b/dist/functions/textBaseline.js.map new file mode 100644 index 0000000..b9166e9 --- /dev/null +++ b/dist/functions/textBaseline.js.map @@ -0,0 +1 @@ +{"version":3,"file":"textBaseline.js","sourceRoot":"","sources":["../../src/functions/textBaseline.ts"],"names":[],"mappings":";;AAAA,uDAAgE;AAChE,wCAAoE;AAEpE,kBAAe,IAAI,4BAAc,CAAC;IAC9B,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,iCAAiC;IAC9C,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE;QACF;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,6CAA6C;YAC1D,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI;SACjB;QACD;YACI,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,qBAAO,CAAC,IAAI;YAClB,IAAI,EAAE,sBAAY;YAClB,QAAQ,EAAE,IAAI;SACjB;KACJ;IACD,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;QAC3B,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,CAAC;QAExB,MAAM,KAAK,GAAG,GAAG,CAAC,iBAAiB,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,YAAY,uBAAa,CAAC;YAC3C,OAAO,IAAI,CAAC,WAAW,CAAC,iCAAiC,MAAM,GAAG,CAAC,CAAC;QAExE,KAAK,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 15dcd67..bc6f42a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14,4 +14,4 @@ class BananCanvas extends forgescript_1.ForgeExtension { } exports.BananCanvas = BananCanvas; ; -//# sourceMappingURL=index.js.map +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/package.json b/package.json index 3a6ae34..1c11224 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@econome/banan.canvas", "description": "Well the name says what it does.", - "version": "2.0.0", + "version": "2.1.0", "main": "dist/index.js", "author": "econome", "license": "MIT", diff --git a/src/classes/builder.ts b/src/classes/builder.ts index fe54be1..1418a7a 100644 --- a/src/classes/builder.ts +++ b/src/classes/builder.ts @@ -1,11 +1,13 @@ import { SKRSContext2D, createCanvas, loadImage, Image } from "@napi-rs/canvas"; import { CanvasUtil } from "./util"; +// Enums export enum GetOrSet { get, set }; export enum WidthOrHeight { width, height }; export enum FilterMethod { add, set, remove, clear, get, parse }; export enum Filter { none, blur, sepia, grayscale, brightness, contrast, invert, saturate }; -export enum textAlign { start, right, center, left, end }; +export enum textAlign { start = "end", left = "right", center = "center", right = "left", end = "start" }; +export enum textBaseline { alphabetic, bottom, hanging, ideographic, middle, top }; export enum MeasureTextProperty { actualBoundingBoxAscent, actualBoundingBoxDescent, @@ -19,6 +21,7 @@ export enum MeasureTextProperty { width }; +// The builder itself export class CanvasBuilder { public static ctx: SKRSContext2D; public static util = CanvasUtil; @@ -291,8 +294,12 @@ export class CanvasBuilder { }; public setTextAlign = (align: textAlign) => { - CanvasBuilder.ctx.textAlign = (textAlign[4 - align] ?? textAlign.left) as CanvasTextAlign; + CanvasBuilder.ctx.textAlign = align as CanvasTextAlign; + return CanvasBuilder; + }; + public setTextBaseline = (baseline: textBaseline) => { + CanvasBuilder.ctx.textBaseline = textBaseline[baseline] as CanvasTextBaseline; return CanvasBuilder; }; diff --git a/src/functions/clearRect.ts b/src/functions/clearRect.ts index 3761f7a..4cdd635 100644 --- a/src/functions/clearRect.ts +++ b/src/functions/clearRect.ts @@ -46,19 +46,26 @@ export default new NativeFunction({ { name: "radius", description: "The rect corners radius.", - rest: false, + rest: true, type: ArgType.Number, required: false } ], - execute(ctx, [canvas, x, y, width, height, radius]) { - canvas = canvas?.trim(); + execute(ctx, [name, x, y, width, height, radius]) { + name = name?.trim(); - const canvs = ctx.getEnvironmentKey(`canvas_${canvas}`); - if (!canvs || !(canvs instanceof CanvasBuilder)) - return this.customError(`There's no such canvas named '${canvas}'`); + const canvas = ctx.getEnvironmentKey(`canvas_${name}`); + if (!canvas || !(canvas instanceof CanvasBuilder)) + return this.customError(`There's no such canvas named '${name}'`); - canvs.clearRect(x, y, width, height); + canvas.clearRect( + x, + y, + width, + height, + radius && radius.length === 1 ? radius[0] : radius + ); + return this.success(); } }); \ No newline at end of file diff --git a/src/functions/drawImage.ts b/src/functions/drawImage.ts index 11e283c..aa543b2 100644 --- a/src/functions/drawImage.ts +++ b/src/functions/drawImage.ts @@ -52,7 +52,7 @@ export default new NativeFunction({ { name: "radius", description: "The radius of image corners.", - rest: false, + rest: true, type: ArgType.Number, required: false } @@ -65,7 +65,15 @@ export default new NativeFunction({ if (!canvs || !(canvs instanceof CanvasBuilder)) return this.customError(`There's no such canvas named '${canvas}'`); - await canvs.drawImage(path, x, y, width ?? undefined, height ?? undefined, radius ?? undefined); + await canvs.drawImage( + path, + x, + y, + width ?? undefined, + height ?? undefined, + radius && radius.length === 1 ? radius[0] : radius + ); + return this.success(); } }); \ No newline at end of file diff --git a/src/functions/fillRect.ts b/src/functions/fillRect.ts index 51b2224..1852dc2 100644 --- a/src/functions/fillRect.ts +++ b/src/functions/fillRect.ts @@ -53,7 +53,7 @@ export default new NativeFunction({ { name: "radius", description: "The rect corners radius.", - rest: false, + rest: true, type: ArgType.Number, required: false } @@ -65,7 +65,15 @@ export default new NativeFunction({ if (!canvs || !(canvs instanceof CanvasBuilder)) return this.customError(`There's no such canvas named '${canvas}'`); - canvs.fillRect(color, x, y, width, height, radius ?? undefined); + canvs.fillRect( + color, + x, + y, + width, + height, + radius && radius.length === 1 ? radius[0] : radius + ); + return this.success(); } }); \ No newline at end of file diff --git a/src/functions/strokeRect.ts b/src/functions/strokeRect.ts index 3347751..0f8d743 100644 --- a/src/functions/strokeRect.ts +++ b/src/functions/strokeRect.ts @@ -60,7 +60,7 @@ export default new NativeFunction({ { name: "radius", description: "The rect corners radius.", - rest: false, + rest: true, type: ArgType.Number, required: false } @@ -72,7 +72,15 @@ export default new NativeFunction({ if (!canvs || !(canvs instanceof CanvasBuilder)) return this.customError(`There's no such canvas named '${canvas}'`); - canvs.strokeRect(color, x, y, width, height, lineWidth ?? undefined, radius ?? undefined); + canvs.strokeRect( + color, + x, + y, + width, + height, + lineWidth ?? undefined, + radius && radius.length === 1 ? radius[0] : radius + ); return this.success(); } diff --git a/src/functions/textBaseline.ts b/src/functions/textBaseline.ts new file mode 100644 index 0000000..102e486 --- /dev/null +++ b/src/functions/textBaseline.ts @@ -0,0 +1,37 @@ +import { ArgType, NativeFunction } from "@tryforge/forgescript"; +import { CanvasBuilder, textAlign, textBaseline } from "../classes"; + +export default new NativeFunction({ + name: "$textBaseline", + version: "1.0.0", + description: "Sets text baseline in a canvas.", + unwrap: true, + brackets: true, + args: [ + { + name: "canvas", + description: "The name of canvas to set text baseline in.", + rest: false, + type: ArgType.String, + required: true + }, + { + name: "baseline", + description: "Text baseline.", + rest: false, + type: ArgType.Enum, + enum: textBaseline, + required: true + } + ], + execute(ctx, [canvas, baseline]) { + canvas = canvas?.trim(); + + const canvs = ctx.getEnvironmentKey(`canvas_${canvas}`); + if (!canvs || !(canvs instanceof CanvasBuilder)) + return this.customError(`There's no such canvas named '${canvas}'`); + + canvs.setTextBaseline(baseline); + return this.success(); + } +}); \ No newline at end of file