提交 a5c04b0a 编写于 作者: D Dragoș Tiselice 提交者: GitHub

Added custom radii for each corner of RRect. (#2820)

In order to implement more detailed animation in Flutter, precise
handling of the rounded corner's radii is necessary. This commit
adds a data structure Radius and updated RRect accordingly.
上级 11dd5cad
此差异已折叠。
......@@ -20,9 +20,14 @@ RRect DartConverter<RRect>::FromDart(Dart_Handle value) {
if (buffer.data() == nullptr)
return result;
result.sk_rrect.setRectXY(
SkVector radii[4] = {
{ buffer[4], buffer[5] }, { buffer[6], buffer[7] },
{ buffer[8], buffer[9] }, { buffer[10], buffer[11] }
};
result.sk_rrect.setRectRadii(
SkRect::MakeLTRB(buffer[0], buffer[1], buffer[2], buffer[3]),
buffer[4], buffer[5]);
radii);
result.is_null = false;
return result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册