AltitudeAngelWings.DrawingExtensions.ToColorInfo C# (CSharp) Method

ToColorInfo() public static method

public static ToColorInfo ( this feature ) : ColorInfo
feature this
return AltitudeAngel.IsolatedPlugin.Common.Maps.ColorInfo
        public static ColorInfo ToColorInfo(this Feature feature)
        {
            uint fillColor = ToARGB((string)feature.Properties.Get("fillColor"), (string)feature.Properties.Get("fillOpacity"));
            uint strokeColor = ToARGB((string)feature.Properties.Get("strokeColor"), (string)feature.Properties.Get("strokeOpacity"));
            int strokeWidth;
            if (!int.TryParse((string)feature.Properties["strokeWidth"], out strokeWidth))
            {
                strokeWidth = 1;
            }

            return new ColorInfo
            {
                FillColor = fillColor,
                StrokeColor = strokeColor,
                StrokeWidth = strokeWidth
            };
        }
DrawingExtensions