Home | History | Annotate | Download | only in cts

Lines Matching defs:path

20 import android.graphics.Path;
36 Path expected = arcWithPoint(0, 100, 100, 0, 100, 100);
37 Path path = arcMotion.getPath(0, 100, 100, 0);
38 assertPathMatches(expected, path);
41 path = arcMotion.getPath(100, 0, 0, -100);
42 assertPathMatches(expected, path);
45 path = arcMotion.getPath(0, -100, -100, 0);
46 assertPathMatches(expected, path);
49 path = arcMotion.getPath(-100, 0, 0, 100);
50 assertPathMatches(expected, path);
58 Path expected;
59 Path path;
62 path = arcMotion.getPath(0, 120, 160, 0);
63 assertPathMatches(expected, path);
66 path = arcMotion.getPath(0, 160, 120, 0);
67 assertPathMatches(expected, path);
70 path = arcMotion.getPath(-120, 0, 0, 160);
71 assertPathMatches(expected, path);
74 path = arcMotion.getPath(-160, 0, 0, 120);
75 assertPathMatches(expected, path);
78 path = arcMotion.getPath(0, -120, -160, 0);
79 assertPathMatches(expected, path);
82 path = arcMotion.getPath(0, -160, -120, 0);
83 assertPathMatches(expected, path);
86 path = arcMotion.getPath(120, 0, 0, -160);
87 assertPathMatches(expected, path);
90 path = arcMotion.getPath(160, 0, 0, -120);
91 assertPathMatches(expected, path);
94 private static Path arcWithPoint(float startX, float startY, float endX, float endY,
100 Path path = new Path();
101 path.moveTo(startX, startY);
102 path.cubicTo(c1x, c1y, c2x, c2y, endX, endY);
103 return path;
116 Path expected = arcWithPoint(0, 100, 100, 0, ex, ey);
117 Path path = arcMotion.getPath(0, 100, 100, 0);
118 assertPathMatches(expected, path);
129 Path expected = arcWithPoint(0, 0, 100, 50, ex, ey);
130 Path path = arcMotion.getPath(0, 0, 100, 50);
131 assertPathMatches(expected, path);
133 // Pretty much the same, but follows a different path.
135 path = arcMotion.getPath(0, 0, 100.001f, 50);
136 assertPathMatches(expected, path);
140 path = arcMotion.getPath(100, 50, 0, 0);
141 assertPathMatches(expected, path);
147 path = arcMotion.getPath(0, 0, 50, 100);
148 assertPathMatches(expected, path);
150 // Pretty much the same, but follows a different path.
152 path = arcMotion.getPath(0, 0, 50, 100.001f);
153 assertPathMatches(expected, path);
157 path = arcMotion.getPath(50, 100, 0, 0);
158 assertPathMatches(expected, path);
169 Path expected = arcWithPoint(0, 0, 50, 100, ex, ey);
170 Path path = arcMotion.getPath(0, 0, 50, 100);
171 assertPathMatches(expected, path);
173 // Pretty much the same, but follows a different path.
175 path = arcMotion.getPath(0, 0, 50, 100.001f);
176 assertPathMatches(expected, path);
180 path = arcMotion.getPath(50, 100, 0, 0);
181 assertPathMatches(expected, path);
187 path = arcMotion.getPath(0, 0, 100, 50);
188 assertPathMatches(expected, path);
190 // Pretty much the same, but follows a different path.
192 path = arcMotion.getPath(0, 0, 100.001f, 50);
193 assertPathMatches(expected, path);
197 path = arcMotion.getPath(100, 50, 0, 0);
198 assertPathMatches(expected, path);
209 Path expected = arcWithPoint(0, 0, 100, 0, ex, ey);
210 Path path = arcMotion.getPath(0, 0, 100, 0);
211 assertPathMatches(expected, path);
215 path = arcMotion.getPath(100, 0, 0, 0);
216 assertPathMatches(expected, path);
218 // Now try vertical path
223 path = arcMotion.getPath(0, 0, 0, 100f);
224 assertPathMatches(expected, path);
229 path = arcMotion.getPath(0, 100, 0, 0f);
230 assertPathMatches(expected, path);