示例#1
0
        private static LeadSize CreateEmptySize()
        {
            var result = new LeadSize();

            result.Width  = LeadDoubleTools.NaN;
            result.Height = LeadDoubleTools.NaN;
            return(result);
        }
示例#2
0
        public static LeadSize Create(double width, double height)
        {
            var result = new LeadSize();

            result.Width  = width;
            result.Height = height;

            return(result);
        }
示例#3
0
        public static LeadSize FromJSON(string value)
        {
            var width = (double)JObject.Parse(value)["width"];

            if (LeadDoubleTools.IsInfinity(width) || LeadDoubleTools.IsNaN(width))
            {
                return(_empty);
            }

            double height = (double)JObject.Parse(value)["height"];
            var    result = new LeadSize();

            result.Width  = width;
            result.Height = height;
            return(result);
        }