private KitBuildItem CreateKitBuildItemPattern(BuildComponentYardage buildComponent) { var fabricStyles = new FabricStyleList(); foreach (var style in buildComponent.FabricStyles) { fabricStyles.Add(new FabricStyle(style.Sku, style.Color)); } var pattern = new Pattern(buildComponent.Area); foreach (var region in buildComponent.Regions) { var patternElement = new PatternElement( PatternElementTypes.Shape, new PathPoint(region.Left, region.Top), new PathPoint(region.Left + region.Width, region.Top + region.Height), region.BuildComponentRectangle.Id ); pattern.PatternElements.Add(patternElement); } return(new KitBuildItemPattern(buildComponent.Id, buildComponent.Quantity, buildComponent.ComponentType, buildComponent.ComponentSubtype, fabricStyles, buildComponent.Area, pattern)); }
protected PatternElement(PatternElement prototype) { if (prototype == null) { throw new ArgumentNullException(nameof(prototype)); } m_type = prototype.m_type; m_source = prototype.m_source; m_target = prototype.m_target; m_id = prototype.m_id; }