// Path: app/src/main/java/com/arexperiments/justaline/AppSettings.java
// public class AppSettings {
// 
//     private static final Vector3f color = new Vector3f(1f, 1f, 1f);
// 
//     private static final float strokeDrawDistance = 0.13f;
// 
//     private static final float minDistance = 0.000001f;
// 
//     private static final float nearClip = 0.001f;
// 
//     private static final float farClip = 100.0f;
// 
//     private static final float smoothing = 0.07f;
// 
//     private static final int smoothingCount = 1500;
// 
//     public enum LineWidth {
//         SMALL(0.006f),
//         MEDIUM(0.011f),
//         LARGE(0.020f);
// 
//         private final float width;
// 
//         LineWidth(float i) {
//             this.width = i;
//         }
// 
//         public float getWidth() {
//             return width;
//         }
//     }
// 
//     public static float getStrokeDrawDistance() {
//         return strokeDrawDistance;
//     }
// 
//     public static Vector3f getColor() {
//         return color;
//     }
// 
//     public static float getMinDistance() {
//         return minDistance;
//     }
// 
//     static float getNearClip() {
//         return nearClip;
//     }
// 
//     static float getFarClip() {
//         return farClip;
//     }
// 
//     public static float getSmoothing() {
//         return smoothing;
//     }
// 
//     public static int getSmoothingCount() {
//         return smoothingCount;
//     }
// }


import android.animation.Animator;
import android.content.Context;
import android.support.constraint.ConstraintLayout;
import android.util.AttributeSet;
import android.util.Pair;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View;
import android.view.accessibility.AccessibilityEvent;
import com.arexperiments.justaline.AppSettings;
import com.arexperiments.justaline.R;
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.arexperiments.justaline.view;



/**
 * Created by Kat on 11/13/17.
 * Custom view for selecting brush size
 */

public class BrushSelector extends ConstraintLayout implements View.OnClickListener {

    private static final String TAG = "BrushSelector";

    private static final int SMALL_BRUSH = 0;

    private static final int MEDIUM_BRUSH = 1;

    private static final int LARGE_BRUSH = 2;

// Path: app/src/main/java/com/arexperiments/justaline/AppSettings.java
// public class AppSettings {
// 
//     private static final Vector3f color = new Vector3f(1f, 1f, 1f);
// 
//     private static final float strokeDrawDistance = 0.13f;
// 
//     private static final float minDistance = 0.000001f;
// 
//     private static final float nearClip = 0.001f;
// 
//     private static final float farClip = 100.0f;
// 
//     private static final float smoothing = 0.07f;
// 
//     private static final int smoothingCount = 1500;
// 
//     public enum LineWidth {
//         SMALL(0.006f),
//         MEDIUM(0.011f),
//         LARGE(0.020f);
// 
//         private final float width;
// 
//         LineWidth(float i) {
//             this.width = i;
//         }
// 
//         public float getWidth() {
//             return width;
//         }
//     }
// 
//     public static float getStrokeDrawDistance() {
//         return strokeDrawDistance;
//     }
// 
//     public static Vector3f getColor() {
//         return color;
//     }
// 
//     public static float getMinDistance() {
//         return minDistance;
//     }
// 
//     static float getNearClip() {
//         return nearClip;
//     }
// 
//     static float getFarClip() {
//         return farClip;
//     }
// 
//     public static float getSmoothing() {
//         return smoothing;
//     }
// 
//     public static int getSmoothingCount() {
//         return smoothingCount;
//     }
// }


// Path: app/src/main/java/com/arexperiments/justaline/view/BrushSelector.java
import android.animation.Animator;
import android.content.Context;
import android.support.constraint.ConstraintLayout;
import android.util.AttributeSet;
import android.util.Pair;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View;
import android.view.accessibility.AccessibilityEvent;
import com.arexperiments.justaline.AppSettings;
import com.arexperiments.justaline.R;

// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.arexperiments.justaline.view;



/**
 * Created by Kat on 11/13/17.
 * Custom view for selecting brush size
 */

public class BrushSelector extends ConstraintLayout implements View.OnClickListener {

    private static final String TAG = "BrushSelector";

    private static final int SMALL_BRUSH = 0;

    private static final int MEDIUM_BRUSH = 1;

    private static final int LARGE_BRUSH = 2;

    private static final Pair<Integer, AppSettings.LineWidth> defaultBrush = new Pair<>(MEDIUM_BRUSH,