@@ -118,12 +118,7 @@ class SVGACanvasDrawer(videoItem: SVGAVideoEntity, val dynamicItem: SVGADynamicE
118
118
shape.shapePath?.let {
119
119
sharedPath.addPath(it)
120
120
}
121
- if (! sharedPath.isEmpty) {
122
- val thisTransform = Matrix ()
123
- shape.transform?.let {
124
- thisTransform.postConcat(it)
125
- }
126
- thisTransform.postConcat(sharedContentTransform)
121
+ if (! sharedPath.isEmpty) {
127
122
sharedPath.transform(sharedContentTransform)
128
123
sharedPaint.reset()
129
124
sharedPaint.isAntiAlias = videoItem.antiAlias
@@ -195,8 +190,10 @@ class SVGACanvasDrawer(videoItem: SVGAVideoEntity, val dynamicItem: SVGADynamicE
195
190
shape.styles?.stroke?.let {
196
191
sharedPaint.color = it
197
192
}
193
+
194
+ val scale = requestScale()
198
195
shape.styles?.strokeWidth?.let {
199
- sharedPaint.strokeWidth = it * requestScale()
196
+ sharedPaint.strokeWidth = it * scale
200
197
}
201
198
shape.styles?.lineCap?.let {
202
199
when {
@@ -213,14 +210,14 @@ class SVGACanvasDrawer(videoItem: SVGAVideoEntity, val dynamicItem: SVGADynamicE
213
210
}
214
211
}
215
212
shape.styles?.miterLimit?.let {
216
- sharedPaint.strokeMiter = it.toFloat() * requestScale()
213
+ sharedPaint.strokeMiter = it.toFloat() * scale
217
214
}
218
215
shape.styles?.lineDash?.let {
219
216
if (it.size == 3 && it[0 ] > 0 && it[1 ] > 0 ) {
220
217
sharedPaint.pathEffect = DashPathEffect (floatArrayOf(
221
- (if (it[0 ] < 1.0f ) 1.0f else it[0 ]) * requestScale() ,
222
- (if (it[1 ] < 0.1f ) 0.1f else it[1 ]) * requestScale()
223
- ), it[2 ] * requestScale() )
218
+ (if (it[0 ] < 1.0f ) 1.0f else it[0 ]) * scale ,
219
+ (if (it[1 ] < 0.1f ) 0.1f else it[1 ]) * scale
220
+ ), it[2 ] * scale )
224
221
}
225
222
}
226
223
}
0 commit comments