MapAround.Mapping.MapWorkspace.addPolygonStyleElement C# (CSharp) Method

addPolygonStyleElement() private method

private addPolygonStyleElement ( PolygonStyle PolygonStyle, XmlDocument doc, XmlElement layerElement ) : void
PolygonStyle PolygonStyle
doc System.Xml.XmlDocument
layerElement System.Xml.XmlElement
return void
        private void addPolygonStyleElement(PolygonStyle PolygonStyle, XmlDocument doc, XmlElement layerElement)
        {
            XmlElement polygonStyleElement = doc.CreateElement("polygon_style");
            layerElement.AppendChild(polygonStyleElement);
            addAttribute(doc, polygonStyleElement, "border_width", PolygonStyle.BorderWidth.ToString(CultureInfo.InvariantCulture));
            addAttribute(doc, polygonStyleElement, "border_color", ColorTranslator.ToHtml(PolygonStyle.BorderColor));
            addAttribute(doc, polygonStyleElement, "border_visible", PolygonStyle.BorderVisible ? "1" : "0");
            addAttribute(doc, polygonStyleElement, "border_dash_style", ((int)PolygonStyle.BorderDashStyle).ToString(CultureInfo.InvariantCulture));
            addAttribute(doc, polygonStyleElement, "border_dash_cap", ((int)PolygonStyle.BorderDashCap).ToString(CultureInfo.InvariantCulture));
            addAttribute(doc, polygonStyleElement, "hatch_style", ((int)PolygonStyle.HatchStyle).ToString(CultureInfo.InvariantCulture));
            addAttribute(doc, polygonStyleElement, "use_hatch", PolygonStyle.UseHatch ? "1" : "0");
            addAttribute(doc, polygonStyleElement, "fill_fore_color", ColorTranslator.ToHtml(PolygonStyle.FillForeColor));
            addAttribute(doc, polygonStyleElement, "fill_back_color", ColorTranslator.ToHtml(PolygonStyle.FillBackColor));
            addAttribute(doc, polygonStyleElement, "fill_pattern", ((int)PolygonStyle.FillPattern).ToString(CultureInfo.InvariantCulture));
            addAttribute(doc, polygonStyleElement, "fill_transparent", PolygonStyle.FillBackColor.A.ToString(CultureInfo.InvariantCulture));

        }