コード例 #1
0
ファイル: Pattern.cs プロジェクト: rgtodd/quiltsystem
        protected Pattern(Pattern prototype)
        {
            if (prototype == null) throw new ArgumentNullException(nameof(prototype));

            m_fabricSize = prototype.m_fabricSize;
            m_patternElements = prototype.m_patternElements.Clone();
        }
コード例 #2
0
ファイル: Pattern.cs プロジェクト: rgtodd/quiltsystem
        public Pattern(JToken json)
        {
            if (json == null) throw new ArgumentNullException(nameof(json));

            var width = Dimension.Parse((string)json[JsonNames.Width]);
            var height = Dimension.Parse((string)json[JsonNames.Height]);
            m_fabricSize = new Area(width, height);
            m_patternElements = new PatternElementList(json[JsonNames.PatternElementList]);
        }
コード例 #3
0
ファイル: Pattern.cs プロジェクト: rgtodd/quiltsystem
 public Pattern(Area fabricSize)
 {
     m_fabricSize = fabricSize ?? throw new ArgumentNullException(nameof(fabricSize));
     m_patternElements = new PatternElementList();
 }