@nmmty/lazycanvas 0.6.0-dev.1d5786 → 0.6.0-dev.7aa084
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -3
- package/dist/structures/components/MorphLayer.d.ts +6 -0
- package/dist/structures/components/MorphLayer.js +9 -1
- package/dist/structures/components/Path2DLayer.d.ts +6 -0
- package/dist/structures/components/Path2DLayer.js +9 -1
- package/dist/structures/components/TextLayer.d.ts +6 -0
- package/dist/structures/components/TextLayer.js +9 -1
- package/package.json +1 -2
- package/test.png +0 -0
- package/test.yaml +1780 -0
- package/dist/helpers/Utlis.d.ts +0 -28
- package/dist/helpers/Utlis.js +0 -78
package/dist/index.d.ts
CHANGED
|
@@ -9,4 +9,3 @@ export { Font, IFont, IFonts, Gradient, IGradient, GradientPoint, GradientColorS
|
|
|
9
9
|
export { Filters } from "./helpers/Filters";
|
|
10
10
|
export { FontsList } from "./helpers/FontsList";
|
|
11
11
|
export type { AnyLayer, AnyCentring, AnyPatternType, AnyGradientType, AnyTextAlign, AnyTextDirection, AnyTextBaseline, AnyWeight, AnyLineCap, AnyLineJoin, AnyExport, AnyLinkType, AnyGlobalCompositeOperation, AnyColorSpace, ScaleType, ColorType, Point, PointNumber, Transform, Extensions } from "./types";
|
|
12
|
-
export { Utils } from "./helpers/Utlis";
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.FontsList = exports.Filters = exports.YAMLReader = exports.JSONReader = exports.Exporter = exports.Link = exports.Pattern = exports.Gradient = exports.Font = exports.LinkType = exports.GradientType = exports.PatternType = exports.Centring = exports.Export = exports.FontWeight = exports.TextBaseline = exports.TextDirection = exports.TextAlign = exports.LineJoin = exports.LineCap = exports.LayerScaleType = exports.LayerType = exports.LazyCanvas = void 0;
|
|
18
18
|
var LazyCanvas_1 = require("./structures/LazyCanvas");
|
|
19
19
|
Object.defineProperty(exports, "LazyCanvas", { enumerable: true, get: function () { return LazyCanvas_1.LazyCanvas; } });
|
|
20
20
|
__exportStar(require("./structures/components"), exports);
|
|
@@ -44,5 +44,3 @@ var Filters_1 = require("./helpers/Filters");
|
|
|
44
44
|
Object.defineProperty(exports, "Filters", { enumerable: true, get: function () { return Filters_1.Filters; } });
|
|
45
45
|
var FontsList_1 = require("./helpers/FontsList");
|
|
46
46
|
Object.defineProperty(exports, "FontsList", { enumerable: true, get: function () { return FontsList_1.FontsList; } });
|
|
47
|
-
var Utlis_1 = require("./helpers/Utlis");
|
|
48
|
-
Object.defineProperty(exports, "Utils", { enumerable: true, get: function () { return Utlis_1.Utils; } });
|
|
@@ -110,6 +110,12 @@ export declare class MorphLayer extends BaseLayer<IMorphLayerProps> {
|
|
|
110
110
|
* @returns {this} The current instance for chaining.
|
|
111
111
|
*/
|
|
112
112
|
setStroke(width: number, cap?: CanvasLineCap, join?: CanvasLineJoin, dash?: number[], dashOffset?: number, miterLimit?: number): this;
|
|
113
|
+
/**
|
|
114
|
+
* Sets whether the Morph Layer should be filled or stroked.
|
|
115
|
+
* @param filled {boolean} - If true, the layer will be filled; otherwise, it will be stroked.
|
|
116
|
+
* @returns {this} The current instance for chaining.
|
|
117
|
+
*/
|
|
118
|
+
setFilled(filled: boolean): this;
|
|
113
119
|
/**
|
|
114
120
|
* Draws the Morph Layer on the canvas.
|
|
115
121
|
* @param ctx {SKRSContext2D} - The canvas rendering context.
|
|
@@ -72,7 +72,15 @@ class MorphLayer extends BaseLayer_1.BaseLayer {
|
|
|
72
72
|
dashOffset: dashOffset || 0,
|
|
73
73
|
miterLimit: miterLimit || 10,
|
|
74
74
|
};
|
|
75
|
-
this
|
|
75
|
+
return this;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Sets whether the Morph Layer should be filled or stroked.
|
|
79
|
+
* @param filled {boolean} - If true, the layer will be filled; otherwise, it will be stroked.
|
|
80
|
+
* @returns {this} The current instance for chaining.
|
|
81
|
+
*/
|
|
82
|
+
setFilled(filled) {
|
|
83
|
+
this.props.filled = filled;
|
|
76
84
|
return this;
|
|
77
85
|
}
|
|
78
86
|
/**
|
|
@@ -115,6 +115,12 @@ export declare class Path2DLayer extends BaseLayer<IPath2DLayerProps> {
|
|
|
115
115
|
* @returns {this} The current instance for chaining.
|
|
116
116
|
*/
|
|
117
117
|
setStroke(width: number, cap?: CanvasLineCap, join?: CanvasLineJoin, dash?: number[], dashOffset?: number, miterLimit?: number): this;
|
|
118
|
+
/**
|
|
119
|
+
* Sets whether the Path2D Layer should be filled or stroked.
|
|
120
|
+
* @param filled {boolean} - If true, the layer will be filled; otherwise, it will be stroked.
|
|
121
|
+
* @returns {this} The current instance for chaining.
|
|
122
|
+
*/
|
|
123
|
+
setFilled(filled: boolean): this;
|
|
118
124
|
/**
|
|
119
125
|
* Sets the color of the Path2D Layer.
|
|
120
126
|
* @param color {string} - The color of the Path2D Layer.
|
|
@@ -123,7 +123,15 @@ class Path2DLayer extends BaseLayer_1.BaseLayer {
|
|
|
123
123
|
dashOffset: dashOffset || 0,
|
|
124
124
|
miterLimit: miterLimit || 10,
|
|
125
125
|
};
|
|
126
|
-
this
|
|
126
|
+
return this;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Sets whether the Path2D Layer should be filled or stroked.
|
|
130
|
+
* @param filled {boolean} - If true, the layer will be filled; otherwise, it will be stroked.
|
|
131
|
+
* @returns {this} The current instance for chaining.
|
|
132
|
+
*/
|
|
133
|
+
setFilled(filled) {
|
|
134
|
+
this.props.filled = filled;
|
|
127
135
|
return this;
|
|
128
136
|
}
|
|
129
137
|
/**
|
|
@@ -194,6 +194,12 @@ export declare class TextLayer extends BaseLayer<ITextLayerProps> {
|
|
|
194
194
|
* @returns {this} The current instance for chaining.
|
|
195
195
|
*/
|
|
196
196
|
setStroke(width: number, cap?: LineCap, join?: LineJoin, dash?: number[], dashOffset?: number, miterLimit?: number): this;
|
|
197
|
+
/**
|
|
198
|
+
* Sets whether the text layer should be filled or stroked.
|
|
199
|
+
* @param filled {boolean} - If true, the layer will be filled; otherwise, it will be stroked.
|
|
200
|
+
* @returns {this} The current instance for chaining.
|
|
201
|
+
*/
|
|
202
|
+
setFilled(filled: boolean): this;
|
|
197
203
|
/**
|
|
198
204
|
* Sets the spacing between words in the text layer.
|
|
199
205
|
* @param wordSpacing {number} - The spacing between words.
|
|
@@ -140,7 +140,15 @@ class TextLayer extends BaseLayer_1.BaseLayer {
|
|
|
140
140
|
dashOffset: dashOffset || 0,
|
|
141
141
|
miterLimit: miterLimit || 10,
|
|
142
142
|
};
|
|
143
|
-
this
|
|
143
|
+
return this;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Sets whether the text layer should be filled or stroked.
|
|
147
|
+
* @param filled {boolean} - If true, the layer will be filled; otherwise, it will be stroked.
|
|
148
|
+
* @returns {this} The current instance for chaining.
|
|
149
|
+
*/
|
|
150
|
+
setFilled(filled) {
|
|
151
|
+
this.props.filled = filled;
|
|
144
152
|
return this;
|
|
145
153
|
}
|
|
146
154
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nmmty/lazycanvas",
|
|
3
|
-
"version": "0.6.0-dev.
|
|
3
|
+
"version": "0.6.0-dev.7aa084",
|
|
4
4
|
"description": "A simple way to interact with @napi-rs/canvas in an advanced way!",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"@hitomihiumi/micro-docgen": "^0.3.0",
|
|
46
46
|
"@types/js-yaml": "^4.0.9",
|
|
47
47
|
"@types/node": "^22.10.2",
|
|
48
|
-
"@typescript-eslint/utils": "^8.39.1",
|
|
49
48
|
"ava": "^6.2.0",
|
|
50
49
|
"eslint": "^9.23.0",
|
|
51
50
|
"eslint-config-neon": "^0.2.7",
|
package/test.png
ADDED
|
Binary file
|