YamlObject FromSolidLayer(SolidLayer layer, YamlMap superclassContent)
        {
            var result = superclassContent;

            result.Add("Width", layer.Width);
            result.Add("Height", layer.Height);
            result.Add("Color", layer.Color);
            return(result);
        }
Ejemplo n.º 2
0
        YamlObject FromSolidLayer(SolidLayer layer, YamlMap superclassContent)
        {
            var result = superclassContent;

            result.Add(nameof(layer.Width), layer.Width);
            result.Add(nameof(layer.Height), layer.Height);
            result.Add(nameof(layer.Color), Scalar(layer.Color));
            return(result);
        }
Ejemplo n.º 3
0
        XElement FromSolidLayer(SolidLayer layer)
        {
            return(new XElement("Solid", GetContents()));

            IEnumerable <XObject> GetContents()
            {
                foreach (var item in GetLayerContents(layer))
                {
                    yield return(item);
                }

                yield return(new XAttribute(nameof(layer.Width), layer.Width));

                yield return(new XAttribute(nameof(layer.Height), layer.Height));

                yield return(new XAttribute(nameof(layer.Color), layer.Color));
            }
        }
Ejemplo n.º 4
0
 public SolidLayerContext CreateLayerContext(SolidLayer layer) => new SolidLayerContext(this, layer);
Ejemplo n.º 5
0
 internal SolidLayerContext(CompositionContext compositionContext, SolidLayer layer)
     : base(compositionContext, layer)
 {
     Layer = layer;
 }