Skip to content

Commit

Permalink
(#10) fixed issue with gradient array values being null when not spec…
Browse files Browse the repository at this point in the history
…ified
  • Loading branch information
lucasstarsz committed Jun 4, 2021
1 parent 543a07b commit 7cc8356
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ public LinearGradientPaint build() {
);
}

float[] fractions = generateIntervals(colors.length);
return new LinearGradientPaint(from.x, from.y, to.x, to.y, fractions, colors);
float[] fractions = generateIntervals(count);
return new LinearGradientPaint(from.x, from.y, to.x, to.y, Arrays.copyOf(fractions, count), Arrays.copyOf(colors, count));
}

/**
Expand Down

0 comments on commit 7cc8356

Please sign in to comment.