Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
fix: Stroke color did not apply sprite alpha.
Browse files Browse the repository at this point in the history
  • Loading branch information
PonyCui committed Jan 16, 2019
1 parent d040e36 commit 2077be9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class SVGACanvasDrawer(videoItem: SVGAVideoEntity, val dynamicItem: SVGADynamicE
}
}

private fun drawShape(sprite: SVGADrawerSprite, canvas :Canvas) {
private fun drawShape(sprite: SVGADrawerSprite, canvas: Canvas) {
resetShareMatrix(sprite.frameEntity.transform)
sprite.frameEntity.shapes.forEach { shape ->
shape.buildPath()
Expand Down Expand Up @@ -199,10 +199,10 @@ class SVGACanvasDrawer(videoItem: SVGAVideoEntity, val dynamicItem: SVGADynamicE
if (sprite.frameEntity.maskPath !== null) canvas.restore()
}
}

shape.styles?.strokeWidth?.let {
if (it > 0) {
resetShapeStrokePaint(shape)
sharedPaint.alpha = Math.min(255, Math.max(0, (sprite.frameEntity.alpha * 255).toInt()))
if (sprite.frameEntity.maskPath !== null) canvas.save()
sprite.frameEntity.maskPath?.let { maskPath ->
sharedPath2.reset()
Expand Down

0 comments on commit 2077be9

Please sign in to comment.