Skip to content

Commit

Permalink
Fixed color wheel not taking into account size changes;
Browse files Browse the repository at this point in the history
  • Loading branch information
mkollmer committed Nov 6, 2019
1 parent 3583e34 commit 9bf2b6c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ private void updateColorWheel() {
width = height;
if (width <= 0)
return;
if (colorWheel == null) {
if (colorWheel == null || colorWheel.getWidth() != width) {
colorWheel = Bitmap.createBitmap(width, width, Bitmap.Config.ARGB_8888);
colorWheelCanvas = new Canvas(colorWheel);
alphaPatternPaint.setShader(PaintBuilder.createAlphaPatternShader(26));
}
if (currentColor == null) {
if (currentColor == null || currentColor.getWidth() != width) {
currentColor = Bitmap.createBitmap(width, width, Bitmap.Config.ARGB_8888);
currentColorCanvas = new Canvas(currentColor);
}
Expand Down

0 comments on commit 9bf2b6c

Please sign in to comment.