SuperMap.Web.iServerJava2.ServerTextStyle.FromJson C# (CSharp) Method

FromJson() public static method

${iServer2_ServerTextStyle_method_FromJson_D}
public static FromJson ( System.Json.JsonObject jsonObject ) : ServerTextStyle
jsonObject System.Json.JsonObject ${iServer2_ServerTextStyle_method_FromJson_param_jsonObject}
return ServerTextStyle
        public static ServerTextStyle FromJson(JsonObject jsonObject)
        {
            if (jsonObject == null)
            {
                return null;
            }

            ServerTextStyle result = new ServerTextStyle();

            if (jsonObject["align"] != null)
            {
                result.Align = (ServerTextAlignment)(int)jsonObject["align"];
            }

            result.BgColor = ServerColor.FromJson((JsonObject)jsonObject["bgColor"]);
            result.Bold = (bool)jsonObject["bold"];
            result.Color = ServerColor.FromJson((JsonObject)jsonObject["color"]);
            result.FixedSize = (bool)jsonObject["fixedSize"];
            result.FixedTextSize = (int)jsonObject["fixedTextSize"];
            result.FontHeight = (double)jsonObject["fontHeight"];
            result.FontName = (string)jsonObject["fontName"];
            result.FontWeight = (int)jsonObject["fontWeight"];
            result.FontWidth = (double)jsonObject["fontWidth"];
            result.Italic = (bool)jsonObject["italic"];
            result.Outline = (bool)jsonObject["outline"];
            result.Rotation = (double)jsonObject["rotation"];
            result.Shadow = (bool)jsonObject["shadow"];
            result.Stroke = (bool)jsonObject["stroke"];
            result.Transparent = (bool)jsonObject["transparent"];
            result.Underline = (bool)jsonObject["underline"];

            return result;
        }