You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let list:List<Stroke> = strokes.into_iter().map(core_types::list::Item::new_from_element).collect();
278
+
Arc::new(list)
279
+
}
269
280
// =======================
270
281
// AUTO-GENERATED VARIANTS
271
282
// =======================
@@ -295,6 +306,7 @@ macro_rules! tagged_value {
295
306
Self::BoxCorners(_) => item!(BoxCorners),
296
307
Self::GradientRamp(_) => item!(Gradient),
297
308
Self::BrushStrokes(_) => item!(BrushTrace),
309
+
Self::Strokes(_) => list!(Stroke),
298
310
// =======================
299
311
// AUTO-GENERATED VARIANTS
300
312
// =======================
@@ -335,6 +347,7 @@ macro_rules! tagged_value {
335
347
x if x == TypeId::of::<Item<Gradient>>() => Ok(TaggedValue::GradientRamp(GradientRamp::from(&*downcast::<Item<Gradient>>(input).unwrap()))),
336
348
x if x == TypeId::of::<Vec<BrushStroke>>() => Ok(TaggedValue::BrushStrokes(*downcast(input).unwrap())),
337
349
x if x == TypeId::of::<Item<BrushTrace>>() => Ok(TaggedValue::BrushStrokes(downcast::<Item<BrushTrace>>(input).unwrap().into_element().0.iter_element_values().cloned().collect())),
350
+
x if x == TypeId::of::<List<Stroke>>() => Ok(TaggedValue::Strokes(downcast::<List<Stroke>>(input).unwrap().into_iter().map(Item::into_element).collect())),
338
351
// =======================
339
352
// AUTO-GENERATED VARIANTS
340
353
// =======================
@@ -369,6 +382,7 @@ macro_rules! tagged_value {
369
382
x if x == TypeId::of::<Item<Gradient>>() => Ok(TaggedValue::GradientRamp(GradientRamp::from(input.downcast_ref::<Item<Gradient>>().unwrap()))),
370
383
x if x == TypeId::of::<Vec<BrushStroke>>() => Ok(TaggedValue::BrushStrokes(input.downcast_ref::<Vec<BrushStroke>>().unwrap().clone())),
371
384
x if x == TypeId::of::<Item<BrushTrace>>() => Ok(TaggedValue::BrushStrokes(input.downcast_ref::<Item<BrushTrace>>().unwrap().element().0.iter_element_values().cloned().collect())),
385
+
x if x == TypeId::of::<List<Stroke>>() => Ok(TaggedValue::Strokes(input.downcast_ref::<List<Stroke>>().unwrap().iter_element_values().cloned().collect())),
372
386
// =======================
373
387
// AUTO-GENERATED VARIANTS
374
388
// =======================
@@ -398,6 +412,7 @@ macro_rules! tagged_value {
398
412
if name == std::any::type_name::<BoxCorners>(){returnSome(TaggedValue::BoxCorners(Vec::new()))}
399
413
$(if name == std::any::type_name::<$ty>(){returnSome(TaggedValue::$identifier(Default::default()))})*
400
414
if name == std::any::type_name::<BrushTrace>(){returnSome(TaggedValue::BrushStrokes(Vec::new()))}
415
+
if name == std::any::type_name::<List<Stroke>>(){returnSome(TaggedValue::Strokes(Vec::new()))}
401
416
// Unranked types without a variant route through `TypeDefault`, with `to_dynany`/`to_any` constructing the actual default at execution time
0 commit comments