未验证 提交 d03f6201 编写于 作者: D Dan Field 提交者: GitHub

Two point conical gradient for web CanvasKit (#17146)

上级 5a074882
......@@ -238,7 +238,25 @@ class GradientConical extends EngineGradient {
@override
js.JsObject createSkiaShader() {
throw UnimplementedError();
assert(experimentalUseSkia);
final js.JsArray<num> jsColors = js.JsArray<num>();
jsColors.length = colors.length;
for (int i = 0; i < colors.length; i++) {
jsColors[i] = colors[i].value;
}
return canvasKit.callMethod('MakeTwoPointConicalGradient', <dynamic>[
makeSkPoint(focal),
focalRadius,
makeSkPoint(center),
radius,
jsColors,
makeSkiaColorStops(colorStops),
tileMode.index,
matrix4 != null ? makeSkMatrix(matrix4) : null,
0,
]);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册