Represents an RGB color.
        //==========================================================================
        public SvgStopElement(SvgDocument document, SvgBaseElement parent, XElement stopElement)
            : base(document, parent, stopElement)
        {
            XAttribute offset_attribute = stopElement.Attribute("offset");
              if(offset_attribute != null)
            Offset = SvgLength.Parse(offset_attribute.Value);

              XAttribute stop_color_attribute = stopElement.Attribute("stop-color");
              if(stop_color_attribute != null)
            Color = SvgColor.Parse(stop_color_attribute.Value);

              XAttribute stop_opacity_attribute = stopElement.Attribute("stop-opacity");
              if(stop_opacity_attribute != null)
            Opacity = SvgLength.Parse(stop_opacity_attribute.Value);
        }
示例#2
0
        //==========================================================================
        public SvgStopElement(SvgDocument document, SvgBaseElement parent, XElement stopElement)
            : base(document, parent, stopElement)
        {
            XAttribute offset_attribute = stopElement.Attribute("offset");

            SvgLength.TryUpdate(ref Offset, offset_attribute?.Value);

            XAttribute stop_color_attribute = stopElement.Attribute("stop-color");

            if (stop_color_attribute != null)
            {
                Color = SvgColor.Parse(stop_color_attribute.Value);
            }

            XAttribute stop_opacity_attribute = stopElement.Attribute("stop-opacity");

            SvgLength.TryUpdate(ref Opacity, stop_opacity_attribute?.Value);
        }
示例#3
0
 //==========================================================================
 public SvgColorPaint(SvgColor color)
 {
     Color = color;
 }
示例#4
0
 //==========================================================================
 public SvgColorPaint(SvgColor color)
 {
     Color = color;
 }