@leafer-ui/render 1.9.12 → 1.10.0
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/package.json +4 -4
- package/src/UIRender.ts +11 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/render",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "@leafer-ui/render",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer-ui/external": "1.
|
|
25
|
+
"@leafer-ui/external": "1.10.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@leafer/interface": "1.
|
|
29
|
-
"@leafer-ui/interface": "1.
|
|
28
|
+
"@leafer/interface": "1.10.0",
|
|
29
|
+
"@leafer-ui/interface": "1.10.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/UIRender.ts
CHANGED
|
@@ -52,15 +52,15 @@ export const UIRender: IUIRenderModule = {
|
|
|
52
52
|
|
|
53
53
|
if (shadow) Effect.shadow(this, canvas, shape)
|
|
54
54
|
|
|
55
|
-
if (__fillAfterStroke) data.__isStrokes ? Paint.strokes(stroke as ILeafStrokePaint[], this, canvas) : Paint.stroke(stroke as string, this, canvas)
|
|
55
|
+
if (__fillAfterStroke) data.__isStrokes ? Paint.strokes(stroke as ILeafStrokePaint[], this, canvas, options) : Paint.stroke(stroke as string, this, canvas, options)
|
|
56
56
|
|
|
57
|
-
if (fill) data.__isFills ? Paint.fills(fill as ILeafPaint[], this, canvas) : Paint.fill(fill as string, this, canvas)
|
|
57
|
+
if (fill) data.__isFills ? Paint.fills(fill as ILeafPaint[], this, canvas, options) : Paint.fill(fill as string, this, canvas, options)
|
|
58
58
|
|
|
59
59
|
if (__drawAfterFill) this.__drawAfterFill(canvas, options)
|
|
60
60
|
|
|
61
61
|
if (innerShadow) Effect.innerShadow(this, canvas, shape)
|
|
62
62
|
|
|
63
|
-
if (stroke && !__fillAfterStroke) data.__isStrokes ? Paint.strokes(stroke as ILeafStrokePaint[], this, canvas) : Paint.stroke(stroke as string, this, canvas)
|
|
63
|
+
if (stroke && !__fillAfterStroke) data.__isStrokes ? Paint.strokes(stroke as ILeafStrokePaint[], this, canvas, options) : Paint.stroke(stroke as string, this, canvas, options)
|
|
64
64
|
|
|
65
65
|
if (filter) Filter.apply(filter, this, this.__nowWorld, canvas, originCanvas, shape)
|
|
66
66
|
|
|
@@ -69,20 +69,20 @@ export const UIRender: IUIRenderModule = {
|
|
|
69
69
|
|
|
70
70
|
} else {
|
|
71
71
|
|
|
72
|
-
if (__fillAfterStroke) data.__isStrokes ? Paint.strokes(stroke as ILeafStrokePaint[], this, canvas) : Paint.stroke(stroke as string, this, canvas)
|
|
72
|
+
if (__fillAfterStroke) data.__isStrokes ? Paint.strokes(stroke as ILeafStrokePaint[], this, canvas, options) : Paint.stroke(stroke as string, this, canvas, options)
|
|
73
73
|
|
|
74
74
|
if (__isFastShadow) {
|
|
75
75
|
const shadow = data.shadow[0], { scaleX, scaleY } = this.getRenderScaleData(true, shadow.scaleFixed)
|
|
76
76
|
canvas.save(), canvas.setWorldShadow(shadow.x * scaleX, shadow.y * scaleY, shadow.blur * scaleX, ColorConvert.string(shadow.color))
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
if (fill) data.__isFills ? Paint.fills(fill as ILeafPaint[], this, canvas) : Paint.fill(fill as string, this, canvas)
|
|
79
|
+
if (fill) data.__isFills ? Paint.fills(fill as ILeafPaint[], this, canvas, options) : Paint.fill(fill as string, this, canvas, options)
|
|
80
80
|
|
|
81
81
|
if (__isFastShadow) canvas.restore()
|
|
82
82
|
|
|
83
83
|
if (__drawAfterFill) this.__drawAfterFill(canvas, options)
|
|
84
84
|
|
|
85
|
-
if (stroke && !__fillAfterStroke) data.__isStrokes ? Paint.strokes(stroke as ILeafStrokePaint[], this, canvas) : Paint.stroke(stroke as string, this, canvas)
|
|
85
|
+
if (stroke && !__fillAfterStroke) data.__isStrokes ? Paint.strokes(stroke as ILeafStrokePaint[], this, canvas, options) : Paint.stroke(stroke as string, this, canvas, options)
|
|
86
86
|
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -99,9 +99,9 @@ export const UIRender: IUIRenderModule = {
|
|
|
99
99
|
|
|
100
100
|
const data = this.__, { fill, stroke } = data
|
|
101
101
|
|
|
102
|
-
if (fill && !options.ignoreFill) data.__isAlphaPixelFill ? Paint.fills(fill as ILeafPaint[], this, canvas) : Paint.fill('#000000', this, canvas)
|
|
102
|
+
if (fill && !options.ignoreFill) data.__isAlphaPixelFill ? Paint.fills(fill as ILeafPaint[], this, canvas, options) : Paint.fill('#000000', this, canvas, options)
|
|
103
103
|
if (data.__isCanvas) this.__drawAfterFill(canvas, options)
|
|
104
|
-
if (stroke && !options.ignoreStroke) data.__isAlphaPixelStroke ? Paint.strokes(stroke as ILeafStrokePaint[], this, canvas) : Paint.stroke('#000000', this, canvas)
|
|
104
|
+
if (stroke && !options.ignoreStroke) data.__isAlphaPixelStroke ? Paint.strokes(stroke as ILeafStrokePaint[], this, canvas, options) : Paint.stroke('#000000', this, canvas, options)
|
|
105
105
|
},
|
|
106
106
|
|
|
107
107
|
__drawAfterFill(canvas: ILeaferCanvas, options: IRenderOptions): void {
|
|
@@ -121,10 +121,10 @@ function drawFast(ui: IUI, canvas: ILeaferCanvas, options: IRenderOptions): void
|
|
|
121
121
|
|
|
122
122
|
ui.__drawRenderPath(canvas)
|
|
123
123
|
|
|
124
|
-
if (__fillAfterStroke) Paint.stroke(stroke as string, ui, canvas)
|
|
124
|
+
if (__fillAfterStroke) Paint.stroke(stroke as string, ui, canvas, options)
|
|
125
125
|
|
|
126
|
-
if (fill) Paint.fill(fill as string, ui, canvas)
|
|
126
|
+
if (fill) Paint.fill(fill as string, ui, canvas, options)
|
|
127
127
|
if (__drawAfterFill) ui.__drawAfterFill(canvas, options)
|
|
128
128
|
|
|
129
|
-
if (stroke && !__fillAfterStroke) Paint.stroke(stroke as string, ui, canvas)
|
|
129
|
+
if (stroke && !__fillAfterStroke) Paint.stroke(stroke as string, ui, canvas, options)
|
|
130
130
|
}
|