Skip to content

Commit

Permalink
refactor: use old style switch statement (#2538)
Browse files Browse the repository at this point in the history
# Summary

Use old-style switch statement.
Closes #2537
  • Loading branch information
jakex7 authored Nov 18, 2024
1 parent 08b1f53 commit 0c30339
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions android/src/main/java/com/horcrux/svg/FeBlendView.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,21 @@ public Bitmap applyFilter(HashMap<String, Bitmap> resultsMap, Bitmap prevResult)
canvas.drawBitmap(in1, 0, 0, paint);

switch (this.mMode) {
case NORMAL -> {
case UNKNOWN:
case NORMAL:
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OVER));
}
case SCREEN -> {
break;
case SCREEN:
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SCREEN));
}
case LIGHTEN -> {
break;
case LIGHTEN:
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.LIGHTEN));
}
case DARKEN -> {
break;
case DARKEN:
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DARKEN));
}
case MULTIPLY -> {}
break;
case MULTIPLY:
break;
}
canvas.drawBitmap(in2, 0, 0, paint);

Expand Down

0 comments on commit 0c30339

Please sign in to comment.