Home
last modified time | relevance | path

Searched refs:lerp (Results 1 – 25 of 217) sorted by relevance

123456789

/third_party/flutter/flutter/packages/flutter/test/painting/
Dstadium_border_test.dart19 expect(ShapeBorder.lerp(c10, c20, 0.0), c10);
20 expect(ShapeBorder.lerp(c10, c20, 0.5), c15);
21 expect(ShapeBorder.lerp(c10, c20, 1.0), c20);
52 expect(ShapeBorder.lerp(stadium, circle, 0.1).getOuterPath(rect), looksLikeS);
53 expect(ShapeBorder.lerp(stadium, circle, 0.9).getOuterPath(rect), looksLikeC);
54 …expect(ShapeBorder.lerp(ShapeBorder.lerp(stadium, circle, 0.9), stadium, 0.1).getOuterPath(rect), …
55 …expect(ShapeBorder.lerp(ShapeBorder.lerp(stadium, circle, 0.9), stadium, 0.9).getOuterPath(rect), …
56 …expect(ShapeBorder.lerp(ShapeBorder.lerp(stadium, circle, 0.1), circle, 0.1).getOuterPath(rect), l…
57 …expect(ShapeBorder.lerp(ShapeBorder.lerp(stadium, circle, 0.1), circle, 0.9).getOuterPath(rect), l…
58 …expect(ShapeBorder.lerp(ShapeBorder.lerp(stadium, circle, 0.1), ShapeBorder.lerp(stadium, circle, …
[all …]
Drounded_rectangle_border_test.dart19 expect(ShapeBorder.lerp(c10, c20, 0.0), c10);
20 expect(ShapeBorder.lerp(c10, c20, 0.5), c15);
21 expect(ShapeBorder.lerp(c10, c20, 1.0), c20);
41 expect(ShapeBorder.lerp(directional, c10, 1.0),
42 ShapeBorder.lerp(c10, directional, 0.0));
59 expect(ShapeBorder.lerp(r, c, 0.1).getOuterPath(rect), looksLikeR);
60 expect(ShapeBorder.lerp(r, c, 0.9).getOuterPath(rect), looksLikeC);
61 expect(ShapeBorder.lerp(ShapeBorder.lerp(r, c, 0.9), r, 0.1).getOuterPath(rect), looksLikeC);
62 expect(ShapeBorder.lerp(ShapeBorder.lerp(r, c, 0.9), r, 0.9).getOuterPath(rect), looksLikeR);
63 expect(ShapeBorder.lerp(ShapeBorder.lerp(r, c, 0.1), c, 0.1).getOuterPath(rect), looksLikeR);
[all …]
Dflutter_logo_test.dart26 test('FlutterLogoDecoration lerp from null to null is null', () {
27 final FlutterLogoDecoration logo = FlutterLogoDecoration.lerp(null, null, 0.5);
31 test('FlutterLogoDecoration lerp from non-null to null lerps margin', () {
32 final FlutterLogoDecoration logo = FlutterLogoDecoration.lerp(start, null, 0.4);
40 test('FlutterLogoDecoration lerp from null to non-null lerps margin', () {
41 final FlutterLogoDecoration logo = FlutterLogoDecoration.lerp(null, end, 0.6);
50 final FlutterLogoDecoration logo = FlutterLogoDecoration.lerp(start, end, 0.5);
51 expect(logo.lightColor, Color.lerp(start.lightColor, end.lightColor, 0.5));
52 expect(logo.darkColor, Color.lerp(start.darkColor, end.darkColor, 0.5));
53 expect(logo.textColor, Color.lerp(start.textColor, end.textColor, 0.5));
[all …]
Dborder_rtl_test.dart16 test('BoxBorder.lerp', () {
45 expect(BoxBorder.lerp(null, null, -1.0), null);
46 expect(BoxBorder.lerp(Border.all(width: 10.0), null, -1.0), Border.all(width: 20.0));
47 …expect(BoxBorder.lerp(null, Border.all(width: 10.0), -1.0), Border.all(width: 0.0, style: BorderSt…
48 …expect(BoxBorder.lerp(directionalWithTop10, null, -1.0), const BorderDirectional(top: BorderSide(w…
49 expect(BoxBorder.lerp(null, directionalWithTop10, -1.0), const BorderDirectional());
50 expect(BoxBorder.lerp(directionalWithTop10, visualWithTop100, -1.0), const Border());
51 expect(BoxBorder.lerp(visualWithSides10, directionalWithMagentaTop5, -1.0), visualWithSides20);
52 …expect(BoxBorder.lerp(visualWithYellowTop5, directionalWithMagentaTop5, -1.0), const Border(top: B…
53 expect(BoxBorder.lerp(visualWithSides10, directionalWithSides10, -1.0), visualWithSides30);
[all …]
Dedge_insets_test.dart41 test('EdgeInsets.lerp()', () {
44 expect(EdgeInsets.lerp(a, b, 0.25), equals(a * 1.25));
45 expect(EdgeInsets.lerp(a, b, 0.25), equals(b * 0.625));
46 expect(EdgeInsets.lerp(a, b, 0.25), equals(a + const EdgeInsets.all(2.5)));
47 expect(EdgeInsets.lerp(a, b, 0.25), equals(b - const EdgeInsets.all(7.5)));
49 expect(EdgeInsets.lerp(null, null, 0.25), isNull);
50 expect(EdgeInsets.lerp(null, b, 0.25), equals(b * 0.25));
51 expect(EdgeInsets.lerp(a, null, 0.25), equals(a * 0.75));
103 test('EdgeInsetsGeometry.lerp(...)', () {
104 …expect(EdgeInsetsGeometry.lerp(const EdgeInsetsDirectional.only(end: 10.0), null, 0.5), const Edge…
[all …]
Dgradient_test.dart20 final LinearGradient actual = LinearGradient.lerp(null, testGradient, 0.25);
33 test('LinearGradient lerp test', () {
51 final LinearGradient actual = LinearGradient.lerp(testGradient1, testGradient2, 0.5);
63 test('LinearGradient lerp test with stops', () {
89 final LinearGradient actual = LinearGradient.lerp(testGradient1, testGradient2, 0.5);
106 test('LinearGradient lerp test with unequal number of colors', () {
121 final LinearGradient actual = LinearGradient.lerp(testGradient1, testGradient2, 0.5);
136 test('LinearGradient lerp test with stops and unequal number of colors', () {
160 final LinearGradient actual = LinearGradient.lerp(testGradient1, testGradient2, 0.5);
272 test('RadialGradient lerp test', () {
[all …]
Dborder_test.dart206 test('Border.lerp', () {
215 expect(Border.lerp(null, null, -1.0), null);
216 expect(Border.lerp(visualWithTop10, null, -1.0), const Border(top: BorderSide(width: 20.0)));
217 expect(Border.lerp(null, visualWithTop10, -1.0), const Border());
218 expect(Border.lerp(at0, at100, -1.0), atMinus100);
220 expect(Border.lerp(null, null, 0.0), null);
221 expect(Border.lerp(visualWithTop10, null, 0.0), const Border(top: BorderSide(width: 10.0)));
222 expect(Border.lerp(null, visualWithTop10, 0.0), const Border());
223 expect(Border.lerp(at0, at100, 0.0), at0);
225 expect(Border.lerp(null, null, 0.25), null);
[all …]
Dbox_painter_test.dart24 expect(BorderSide.lerp(side1, side2, 0.0), equals(side1));
25 expect(BorderSide.lerp(side1, side2, 1.0), equals(side2));
26 expect(BorderSide.lerp(side1, side2, 0.5), equals(BorderSide(
27 color: Color.lerp(const Color(0xFF000000), const Color(0xFF00FFFF), 0.5),
33 BorderSide interpolated = BorderSide.lerp(side2, side3, 0.2);
37 interpolated = BorderSide.lerp(side3, side2, 0.2);
56 final Border border2 = Border.lerp(null, border1, 0.25);
57 final Border border3 = Border.lerp(border1, null, 0.25);
65 final Border border4 = Border.lerp(border2, border3, 0.5);
91 final BoxShadow shadow2 = BoxShadow.lerp(null, shadow1, 0.25);
[all …]
Ddecoration_test.dart97 test('Decoration.lerp()', () {
101 BoxDecoration c = Decoration.lerp(a, b, 0.0);
104 c = Decoration.lerp(a, b, 0.25);
105 expect(c.color, equals(Color.lerp(const Color(0xFFFFFFFF), const Color(0x00000000), 0.25)));
107 c = Decoration.lerp(a, b, 1.0);
235 test('BoxDecoration.lerp - shapes', () {
236 // We don't lerp the shape, we just switch from one to the other at t=0.5.
237 // (Use a ShapeDecoration and ShapeBorder if you want to lerp the shapes...)
239 BoxDecoration.lerp(
247 BoxDecoration.lerp(
[all …]
Dtext_style_test.dart97 final TextStyle s5 = TextStyle.lerp(s1, s3, 0.25);
116 expect(TextStyle.lerp(null, null, 0.5), isNull);
118 final TextStyle s6 = TextStyle.lerp(null, s3, 0.25);
131 final TextStyle s7 = TextStyle.lerp(null, s3, 0.75);
144 final TextStyle s8 = TextStyle.lerp(s3, null, 0.25);
157 final TextStyle s9 = TextStyle.lerp(s3, null, 0.75);
259 expect(TextStyle.lerp(foo, bar, 0.5).debugLabel, 'lerp(foo ⎯0.5→ bar)');
260 …expect(TextStyle.lerp(foo.merge(bar), baz, 0.51).copyWith().debugLabel, '(lerp((foo).merge(bar) ⎯0…
293 // lerp
294 expect(TextStyle.lerp(redTextStyle, blueTextStyle, .25).color, Color.lerp(red, blue, .25));
[all …]
Dalignment_test.dart27 test('Alignment.lerp()', () {
30 expect(Alignment.lerp(a, b, 0.25), equals(const Alignment(-0.75, -1.0)));
32 expect(Alignment.lerp(null, null, 0.25), isNull);
33 expect(Alignment.lerp(null, b, 0.25), equals(const Alignment(0.0, -0.25)));
34 expect(Alignment.lerp(a, null, 0.25), equals(const Alignment(-0.75, -0.75)));
105 test('AlignmentGeometry.lerp ad hoc tests', () {
111 … expect(AlignmentGeometry.lerp(mixed1, mixed2, 0.0).resolve(direction), mixed1.resolve(direction));
112 … expect(AlignmentGeometry.lerp(mixed1, mixed2, 1.0).resolve(direction), mixed2.resolve(direction));
113 …expect(AlignmentGeometry.lerp(mixed1, mixed2, 0.25).resolve(direction), mixed3.resolve(direction));
117 test('lerp commutes with resolve', () {
[all …]
Dfractional_offset_test.dart26 test('FractionalOffset.lerp()', () {
29 expect(FractionalOffset.lerp(a, b, 0.25), equals(const FractionalOffset(0.125, 0.0)));
31 expect(FractionalOffset.lerp(null, null, 0.25), isNull);
32 expect(FractionalOffset.lerp(null, b, 0.25), equals(const FractionalOffset(0.5, 0.5 - 0.125)));
33 expect(FractionalOffset.lerp(a, null, 0.25), equals(const FractionalOffset(0.125, 0.125)));
/third_party/flutter/flutter/packages/flutter/test/material/
Darc_test.dart43 expect(tween.lerp(0.5), equals(const Offset(0.0, 5.0)));
50 expect(tween.lerp(0.5), equals(const Offset(5.0, 0.0)));
58 expect(tween.lerp(0.5), equals(const Rect.fromLTWH(0.0, 5.0, 10.0, 10.0)));
65 expect(tween.lerp(0.5), equals(const Rect.fromLTWH(5.0, 0.0, 10.0, 10.0)));
73 expect(tween.lerp(0.0), begin);
74 expect(tween.lerp(0.25), within<Offset>(distance: 2.0, from: const Offset(126.0, 120.0)));
75 expect(tween.lerp(0.75), within<Offset>(distance: 2.0, from: const Offset(48.0, 196.0)));
76 expect(tween.lerp(1.0), end);
79 expect(tween.lerp(0.0), end);
80 expect(tween.lerp(0.25), within<Offset>(distance: 2.0, from: const Offset(91.0, 239.0)));
[all …]
Dtext_theme_test.dart155 test('TextTheme lerp with second parameter null', () {
157 final TextTheme lerped = TextTheme.lerp(theme, null, 0.25);
159 expect(lerped.display4, TextStyle.lerp(theme.display4, null, 0.25));
160 expect(lerped.display3, TextStyle.lerp(theme.display3, null, 0.25));
161 expect(lerped.display2, TextStyle.lerp(theme.display2, null, 0.25));
162 expect(lerped.display1, TextStyle.lerp(theme.display1, null, 0.25));
163 expect(lerped.caption, TextStyle.lerp(theme.caption, null, 0.25));
164 expect(lerped.headline, TextStyle.lerp(theme.headline, null, 0.25));
165 expect(lerped.title, TextStyle.lerp(theme.title, null, 0.25));
166 expect(lerped.subhead, TextStyle.lerp(theme.subhead, null, 0.25));
[all …]
/third_party/flutter/flutter/packages/flutter/test/animation/
Dtween_test.dart48 expect(tween.lerp(0.5), equals(const Size(10.0, 15.0)));
54 expect(tween.lerp(0.5), 7);
55 expect(tween.lerp(0.7), 8);
62 expect(tween.lerp(0.5), equals(Rect.lerp(a, b, 0.5)));
70 expect(tween.lerp(0.0), equals(a));
71 expect(tween.lerp(1.0), equals(b));
73 tween.lerp(0.5),
78 expect(rotationTween.lerp(0.0), equals(a));
79 expect(rotationTween.lerp(1.0), equals(c));
81 rotationTween.lerp(0.5).absoluteError(
[all …]
/third_party/flutter/flutter/packages/flutter/test/rendering/
Dbox_constraints_test.dart63 test('BoxConstraints lerp', () {
64 expect(BoxConstraints.lerp(null, null, 0.5), isNull);
71 BoxConstraints copy = BoxConstraints.lerp(null, constraints, 0.5);
76 copy = BoxConstraints.lerp(constraints, null, 0.5);
81 copy = BoxConstraints.lerp(const BoxConstraints(
93 test('BoxConstraints lerp with unbounded width', () {
112 expect(BoxConstraints.lerp(constraints1, constraints2, 0.5), constraints3);
115 test('BoxConstraints lerp with unbounded height', () {
134 expect(BoxConstraints.lerp(constraints1, constraints2, 0.5), constraints3);
137 test('BoxConstraints lerp from bounded to unbounded', () {
[all …]
Dtable_border_test.dart65 test('TableBorder.lerp', () {
102 expect(TableBorder.lerp(tableA, tableC, 0.5), tableB);
103 expect(TableBorder.lerp(tableA, tableB, 2.0), tableC);
104 expect(TableBorder.lerp(tableB, tableC, -1.0), tableA);
105 expect(TableBorder.lerp(tableA, tableC, 0.9195).isUniform, isFalse);
106 expect(TableBorder.lerp(tableA, tableC, 0.9195).dimensions,
107 EdgeInsets.lerp(tableA.dimensions, tableC.dimensions, 0.9195));
110 test('TableBorder.lerp with nulls', () {
113 expect(TableBorder.lerp(table2, null, 0.5), table1);
114 expect(TableBorder.lerp(null, table2, 0.5), table1);
[all …]
/third_party/skia/modules/skottie/src/layers/shapelayer/
DPuckerBloat.cpp23 static SkPoint lerp(const SkPoint& p0, const SkPoint& p1, SkScalar t) { in lerp() function
61 path.moveTo(lerp(contour_start, center, fAmount)); in onRevalidateEffect()
63 path.cubicTo(lerp(c.ctrl0, center, -fAmount), in onRevalidateEffect()
64 lerp(c.ctrl1, center, -fAmount), in onRevalidateEffect()
65 lerp(c.pt , center, fAmount)); in onRevalidateEffect()
89 lerp(line_start, line_end, kCtrlPosFraction), in onRevalidateEffect()
90 lerp(line_start, line_end, 1 - kCtrlPosFraction), in onRevalidateEffect()
110 lerp(pts[1], conic_start, kCubicCircleCoeff), in onRevalidateEffect()
111 lerp(pts[1], conic_end , kCubicCircleCoeff), in onRevalidateEffect()
/third_party/flutter/flutter/packages/flutter/test/widgets/
Dicon_theme_data_test.dart16 final IconThemeData lerped = IconThemeData.lerp(data, const IconThemeData.fallback(), 0.25);
22 test('IconThemeData lerp with first null', () {
25 final IconThemeData lerped = IconThemeData.lerp(null, data, 0.25);
31 test('IconThemeData lerp with second null', () {
34 final IconThemeData lerped = IconThemeData.lerp(data, null, 0.25);
40 test('IconThemeData lerp with both null', () {
41 final IconThemeData lerped = IconThemeData.lerp(null, null, 0.25);
/third_party/flutter/flutter/packages/flutter/lib/src/painting/
Drounded_rectangle_border.dart61 side: BorderSide.lerp(a.side, side, t),
62 borderRadius: BorderRadiusGeometry.lerp(a.borderRadius, borderRadius, t),
67 side: BorderSide.lerp(a.side, side, t),
80 side: BorderSide.lerp(side, b.side, t),
81 borderRadius: BorderRadiusGeometry.lerp(borderRadius, b.borderRadius, t),
86 side: BorderSide.lerp(side, b.side, t),
177 side: BorderSide.lerp(a.side, side, t),
178 borderRadius: BorderRadiusGeometry.lerp(a.borderRadius, borderRadius, t),
184 side: BorderSide.lerp(a.side, side, t),
191 side: BorderSide.lerp(a.side, side, t),
[all …]
Dstadium_border.dart46 return StadiumBorder(side: BorderSide.lerp(a.side, side, t));
49 side: BorderSide.lerp(a.side, side, t),
55 side: BorderSide.lerp(a.side, side, t),
67 return StadiumBorder(side: BorderSide.lerp(side, b.side, t));
70 side: BorderSide.lerp(side, b.side, t),
76 side: BorderSide.lerp(side, b.side, t),
159 side: BorderSide.lerp(a.side, side, t),
165 side: BorderSide.lerp(a.side, side, t),
171 side: BorderSide.lerp(a.side, side, t),
183 side: BorderSide.lerp(side, b.side, t),
[all …]
/third_party/flutter/skia/src/gpu/effects/generated/
DGrComposeLerpRedEffect.h21 std::unique_ptr<GrFragmentProcessor> lerp) { in Make() argument
23 new GrComposeLerpRedEffect(std::move(child1), std::move(child2), std::move(lerp))); in Make()
35 std::unique_ptr<GrFragmentProcessor> lerp) in GrComposeLerpRedEffect() argument
45 SkASSERT(lerp); in GrComposeLerpRedEffect()
47 this->registerChildProcessor(std::move(lerp)); in GrComposeLerpRedEffect()
/third_party/flutter/engine/flutter/testing/dart/
Dtext_test.dart10 group('FontWeight.lerp', () {
12 expect(FontWeight.lerp(FontWeight.w400, FontWeight.w600, .5), equals(FontWeight.w500));
16 expect(FontWeight.lerp(null, null, 0), isNull);
20 expect(FontWeight.lerp(null, FontWeight.w400, 0), equals(FontWeight.w400));
24 expect(FontWeight.lerp(FontWeight.w400, null, 1), equals(FontWeight.w400));
/third_party/flutter/skia/third_party/externals/sdl/src/joystick/psp/
DSDL_sysjoystick.c66 static SDL_INLINE void lerp (point *dest, point *a, point *b, float t) in lerp() function
76 lerp (&ab, &a, &b, t); /* point between a and b */ in calc_bezier_y()
77 lerp (&bc, &b, &c, t); /* point between b and c */ in calc_bezier_y()
78 lerp (&cd, &c, &d, t); /* point between c and d */ in calc_bezier_y()
79 lerp (&abbc, &ab, &bc, t); /* point between ab and bc */ in calc_bezier_y()
80 lerp (&bccd, &bc, &cd, t); /* point between bc and cd */ in calc_bezier_y()
81 lerp (&dest, &abbc, &bccd, t); /* point on the bezier-curve */ in calc_bezier_y()
/third_party/flutter/flutter/packages/flutter/lib/src/material/
Dtab_bar_theme.dart90 /// {@macro dart.ui.shadow.lerp}
91 static TabBarTheme lerp(TabBarTheme a, TabBarTheme b, double t) {
96 indicator: Decoration.lerp(a.indicator, b.indicator, t),
98 labelColor: Color.lerp(a.labelColor, b.labelColor, t),
99 labelPadding: EdgeInsets.lerp(a.labelPadding, b.labelPadding, t),
100 labelStyle: TextStyle.lerp(a.labelStyle, b.labelStyle, t),
101 unselectedLabelColor: Color.lerp(a.unselectedLabelColor, b.unselectedLabelColor, t),
102 unselectedLabelStyle: TextStyle.lerp(a.unselectedLabelStyle, b.unselectedLabelStyle, t),

123456789