modern-canvas 0.7.7 → 0.7.9

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.mjs CHANGED
@@ -5401,6 +5401,7 @@ class ViewportTexture extends PixelsTexture {
5401
5401
  class CanvasContext extends Path2D {
5402
5402
  fillStyle;
5403
5403
  strokeStyle;
5404
+ strokeAlignment;
5404
5405
  lineCap;
5405
5406
  lineJoin;
5406
5407
  lineWidth;
@@ -5442,7 +5443,7 @@ class CanvasContext extends Path2D {
5442
5443
  uvTransform: this.uvTransform,
5443
5444
  vertTransform: this.vertTransform,
5444
5445
  style: {
5445
- alignment: 0.5,
5446
+ alignment: this.strokeAlignment ?? 0.5,
5446
5447
  cap: this.lineCap ?? "butt",
5447
5448
  join: this.lineJoin ?? "miter",
5448
5449
  width: this.lineWidth ?? 1,
@@ -5490,6 +5491,7 @@ class CanvasContext extends Path2D {
5490
5491
  this.fillStyle = source.fillStyle;
5491
5492
  this.uvTransform = source.uvTransform;
5492
5493
  this.vertTransform = source.vertTransform;
5494
+ this.strokeAlignment = source.strokeAlignment;
5493
5495
  this.lineCap = source.lineCap;
5494
5496
  this.lineJoin = source.lineJoin;
5495
5497
  this.lineWidth = source.lineWidth;
@@ -5503,6 +5505,7 @@ class CanvasContext extends Path2D {
5503
5505
  this.fillStyle = void 0;
5504
5506
  this.uvTransform = void 0;
5505
5507
  this.vertTransform = void 0;
5508
+ this.strokeAlignment = void 0;
5506
5509
  this.lineCap = void 0;
5507
5510
  this.lineJoin = void 0;
5508
5511
  this.lineWidth = void 0;
@@ -9344,6 +9347,7 @@ class BaseElement2DOutline extends BaseElement2DFill {
9344
9347
  ctx.lineWidth = this.width || 1;
9345
9348
  ctx.uvTransform = uvTransform;
9346
9349
  ctx.strokeStyle = this._texture ?? this.color;
9350
+ ctx.strokeAlignment = 0;
9347
9351
  ctx.stroke({ disableWrapMode });
9348
9352
  }
9349
9353
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-canvas",
3
3
  "type": "module",
4
- "version": "0.7.7",
4
+ "version": "0.7.9",
5
5
  "packageManager": "pnpm@9.15.1",
6
6
  "description": "A JavaScript WebGL rendering engine.",
7
7
  "author": "wxm",
@@ -71,14 +71,14 @@
71
71
  "earcut": "^3.0.2",
72
72
  "modern-font": "^0.4.1",
73
73
  "modern-idoc": "^0.8.6",
74
- "modern-path2d": "^1.4.5",
75
- "modern-text": "^1.7.2",
74
+ "modern-path2d": "^1.4.8",
75
+ "modern-text": "^1.7.4",
76
76
  "yoga-layout": "^3.2.1"
77
77
  },
78
78
  "devDependencies": {
79
- "@antfu/eslint-config": "^4.17.0",
79
+ "@antfu/eslint-config": "^4.18.0",
80
80
  "@types/earcut": "^3.0.0",
81
- "@types/node": "^24.0.14",
81
+ "@types/node": "^24.1.0",
82
82
  "bumpp": "^10.2.0",
83
83
  "conventional-changelog-cli": "^5.0.0",
84
84
  "eslint": "^9.31.0",