Skip to content

Commit

Permalink
fix alpha interpolation (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
micycle1 committed Jun 3, 2022
1 parent 00eced0 commit 1002413
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/micycle/peasygradients/gradient/Gradient.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public int getColor(float position) {
/**
* Treat alpha separately (to simplify colorspace classes)
*/
int alpha = (int) Math.floor((currStop.alpha + (position * (prevStop.alpha - currStop.alpha))) + 0.5d); // TODO sometimes 254?
int alpha = (int) Math.floor((prevStop.alpha + (position * (currStop.alpha - prevStop.alpha))) + 0.5d); // TODO sometimes 254?

/**
* Finally convert the given colorspace value to sARGB int to eventually write
Expand Down

0 comments on commit 1002413

Please sign in to comment.