YamlObject FromSolidColorFill(SolidColorFill content, YamlMap superclassContent) { var result = superclassContent; result.Add(nameof(content.Color), FromAnimatable(content.Color)); return(result); }
YamlObject FromSolidColorFill(SolidColorFill content, YamlMap superclassContent) { var result = superclassContent; result.Add("Color", FromAnimatable(content.Color, FromColor)); result.Add("OpacityPercent", FromAnimatable(content.OpacityPercent)); return(result); }
XElement FromSolidColorFill(SolidColorFill content) { return(new XElement("SolidColorFill", GetContents())); IEnumerable <XObject> GetContents() { foreach (var item in GetShapeLayerContentContents(content)) { yield return(item); } yield return(FromAnimatable("Color", content.Color)); yield return(FromAnimatable("Opacity", content.Opacity)); } }
SolidColorFill ComposeSolidColorFills(SolidColorFill a, SolidColorFill b) { if (!b.Color.IsAnimated && !b.Opacity.IsAnimated) { if (b.Opacity.InitialValue == LottieData.Opacity.Opaque && b.Color.InitialValue.A == 1) { // b overrides a. return(b); } else if (b.Opacity.InitialValue.IsTransparent || b.Color.InitialValue.A == 0) { // b is transparent, so a wins. return(a); } } Translation.Issues.MultipleFillsIsNotSupported(); return(b); }