1 package com.airbnb.lottie.model; 2 3 import android.graphics.PointF; 4 import androidx.annotation.RestrictTo; 5 6 import static androidx.annotation.RestrictTo.Scope.LIBRARY; 7 8 @RestrictTo(LIBRARY) 9 public class CubicCurveData { 10 private final PointF controlPoint1; 11 private final PointF controlPoint2; 12 private final PointF vertex; 13 CubicCurveData()14 public CubicCurveData() { 15 controlPoint1 = new PointF(); 16 controlPoint2 = new PointF(); 17 vertex = new PointF(); 18 } 19 CubicCurveData(PointF controlPoint1, PointF controlPoint2, PointF vertex)20 public CubicCurveData(PointF controlPoint1, PointF controlPoint2, PointF vertex) { 21 this.controlPoint1 = controlPoint1; 22 this.controlPoint2 = controlPoint2; 23 this.vertex = vertex; 24 } 25 setControlPoint1(float x, float y)26 public void setControlPoint1(float x, float y) { 27 controlPoint1.set(x, y); 28 } 29 getControlPoint1()30 public PointF getControlPoint1() { 31 return controlPoint1; 32 } 33 setControlPoint2(float x, float y)34 public void setControlPoint2(float x, float y) { 35 controlPoint2.set(x, y); 36 } 37 getControlPoint2()38 public PointF getControlPoint2() { 39 return controlPoint2; 40 } 41 setVertex(float x, float y)42 public void setVertex(float x, float y) { 43 vertex.set(x, y); 44 } 45 getVertex()46 public PointF getVertex() { 47 return vertex; 48 } 49 } 50