Complete path support in the llr / rust generator

This patch takes care of the lowering of events/coordinates arrays as
path data, which originates from a `commands: ...` string of SVG path
commands.

In order to minimize the path specific code in the generator, the
compile_paths now generates a Vec<Expression> for the events and
coordinates.
This commit is contained in:
Simon Hausmann 2022-01-07 08:39:43 +01:00 committed by Olivier Goffart
parent 933e580618
commit 31471fcf89
12 changed files with 236 additions and 141 deletions

View file

@ -6,8 +6,8 @@
#include <string_view>
#include "sixtyfps_pathdata_internal.h"
namespace sixtyfps::private_api {
// The C++ code generator assumes that enums are in the cbindgen_private namespace
namespace sixtyfps::cbindgen_private {
using cbindgen_private::types::PathArcTo;
using cbindgen_private::types::PathCubicTo;
using cbindgen_private::types::PathElement;
@ -16,6 +16,11 @@ using cbindgen_private::types::PathLineTo;
using cbindgen_private::types::PathMoveTo;
using cbindgen_private::types::PathQuadraticTo;
using cbindgen_private::types::Point;
}
namespace sixtyfps::private_api {
using cbindgen_private::types::PathElement;
using cbindgen_private::types::PathEvent;
using cbindgen_private::types::Point;
struct PathData
{