Skip to content

Commit

Permalink
Set alpha after color
Browse files Browse the repository at this point in the history
  • Loading branch information
gpeal committed Dec 27, 2023
1 parent 866cb3f commit b0b6b7c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,17 @@ public class SolidLayer extends BaseLayer {
return;
}

int opacity = transform.getOpacity() == null ? 100 : transform.getOpacity().getValue();
int alpha = (int) (parentAlpha / 255f * (backgroundAlpha / 255f * opacity / 100f) * 255);
paint.setAlpha(alpha);
Integer color = colorAnimation == null ? null : colorAnimation.getValue();
if (color != null) {
paint.setColor(color);
} else {
paint.setColor(layerModel.getSolidColor());
}

int opacity = transform.getOpacity() == null ? 100 : transform.getOpacity().getValue();
int alpha = (int) (parentAlpha / 255f * (backgroundAlpha / 255f * opacity / 100f) * 255);
paint.setAlpha(alpha);

if (colorFilterAnimation != null) {
paint.setColorFilter(colorFilterAnimation.getValue());
}
Expand Down

0 comments on commit b0b6b7c

Please sign in to comment.