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.cjs +5 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +33 -33
- package/dist/index.mjs +5 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -5407,6 +5407,7 @@ class ViewportTexture extends PixelsTexture {
|
|
|
5407
5407
|
class CanvasContext extends modernPath2d.Path2D {
|
|
5408
5408
|
fillStyle;
|
|
5409
5409
|
strokeStyle;
|
|
5410
|
+
strokeAlignment;
|
|
5410
5411
|
lineCap;
|
|
5411
5412
|
lineJoin;
|
|
5412
5413
|
lineWidth;
|
|
@@ -5448,7 +5449,7 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5448
5449
|
uvTransform: this.uvTransform,
|
|
5449
5450
|
vertTransform: this.vertTransform,
|
|
5450
5451
|
style: {
|
|
5451
|
-
alignment: 0.5,
|
|
5452
|
+
alignment: this.strokeAlignment ?? 0.5,
|
|
5452
5453
|
cap: this.lineCap ?? "butt",
|
|
5453
5454
|
join: this.lineJoin ?? "miter",
|
|
5454
5455
|
width: this.lineWidth ?? 1,
|
|
@@ -5496,6 +5497,7 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5496
5497
|
this.fillStyle = source.fillStyle;
|
|
5497
5498
|
this.uvTransform = source.uvTransform;
|
|
5498
5499
|
this.vertTransform = source.vertTransform;
|
|
5500
|
+
this.strokeAlignment = source.strokeAlignment;
|
|
5499
5501
|
this.lineCap = source.lineCap;
|
|
5500
5502
|
this.lineJoin = source.lineJoin;
|
|
5501
5503
|
this.lineWidth = source.lineWidth;
|
|
@@ -5509,6 +5511,7 @@ class CanvasContext extends modernPath2d.Path2D {
|
|
|
5509
5511
|
this.fillStyle = void 0;
|
|
5510
5512
|
this.uvTransform = void 0;
|
|
5511
5513
|
this.vertTransform = void 0;
|
|
5514
|
+
this.strokeAlignment = void 0;
|
|
5512
5515
|
this.lineCap = void 0;
|
|
5513
5516
|
this.lineJoin = void 0;
|
|
5514
5517
|
this.lineWidth = void 0;
|
|
@@ -9350,6 +9353,7 @@ class BaseElement2DOutline extends BaseElement2DFill {
|
|
|
9350
9353
|
ctx.lineWidth = this.width || 1;
|
|
9351
9354
|
ctx.uvTransform = uvTransform;
|
|
9352
9355
|
ctx.strokeStyle = this._texture ?? this.color;
|
|
9356
|
+
ctx.strokeAlignment = 0;
|
|
9353
9357
|
ctx.stroke({ disableWrapMode });
|
|
9354
9358
|
}
|
|
9355
9359
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1424,6 +1424,7 @@ interface FillDraw extends Partial<CanvasBatchable> {
|
|
|
1424
1424
|
declare class CanvasContext extends Path2D {
|
|
1425
1425
|
fillStyle?: Color$1 | Texture2D;
|
|
1426
1426
|
strokeStyle?: Color$1 | Texture2D;
|
|
1427
|
+
strokeAlignment?: number;
|
|
1427
1428
|
lineCap?: LineCap;
|
|
1428
1429
|
lineJoin?: LineJoin;
|
|
1429
1430
|
lineWidth?: number;
|
package/dist/index.d.mts
CHANGED
|
@@ -1424,6 +1424,7 @@ interface FillDraw extends Partial<CanvasBatchable> {
|
|
|
1424
1424
|
declare class CanvasContext extends Path2D {
|
|
1425
1425
|
fillStyle?: Color$1 | Texture2D;
|
|
1426
1426
|
strokeStyle?: Color$1 | Texture2D;
|
|
1427
|
+
strokeAlignment?: number;
|
|
1427
1428
|
lineCap?: LineCap;
|
|
1428
1429
|
lineJoin?: LineJoin;
|
|
1429
1430
|
lineWidth?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1424,6 +1424,7 @@ interface FillDraw extends Partial<CanvasBatchable> {
|
|
|
1424
1424
|
declare class CanvasContext extends Path2D {
|
|
1425
1425
|
fillStyle?: Color$1 | Texture2D;
|
|
1426
1426
|
strokeStyle?: Color$1 | Texture2D;
|
|
1427
|
+
strokeAlignment?: number;
|
|
1427
1428
|
lineCap?: LineCap;
|
|
1428
1429
|
lineJoin?: LineJoin;
|
|
1429
1430
|
lineWidth?: number;
|