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

Commit

Permalink
fix: update filter when matte sprite frame alpha = 0, it is visuable.
Browse files Browse the repository at this point in the history
  • Loading branch information
errnull committed Jun 19, 2019
1 parent 214e52a commit b25fafb
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ open internal class SGVADrawer(val videoItem: SVGAVideoEntity) {
internal fun requestFrameSprites(frameIndex: Int): List<SVGADrawerSprite> {
return videoItem.sprites.mapNotNull {
if (frameIndex >= 0 && frameIndex < it.frames.size) {
if (it.frames[frameIndex].alpha <= 0.0) {
return@mapNotNull null
it.imageKey?.let { imageKey ->
if (!imageKey.endsWith(".matte") && it.frames[frameIndex].alpha <= 0.0) {
return@mapNotNull null
}
return@mapNotNull SVGADrawerSprite(it.matteKey, it.imageKey, it.frames[frameIndex])
}
return@mapNotNull SVGADrawerSprite(it.matteKey, it.imageKey, it.frames[frameIndex])
}
return@mapNotNull null
}
Expand Down

0 comments on commit b25fafb

Please sign in to comment.