using System.Collections.Generic; namespace Barcoded { /// /// Vectored version of the barcode /// public class LinearVectors { internal LinearVectors() { // Empty Constructor Width = 0; } internal LinearVectors(LinearEncoder encoder) { Data.Clear(); Width = encoder.LinearEncoding.MinimumWidth * encoder.XDimension; foreach (KeyValuePair symbol in encoder.LinearEncoding.Symbols) { foreach (KeyValuePair module in symbol.Value.Pattern) { LinearModule newModule = new LinearModule(module.Value.ModuleType, module.Value.Width * encoder.XDimension); Data.Add(Data.Count, newModule); } } } /// /// The combined bar and space modules, ordered list that represents the full barcode. /// public Dictionary Data { get; } = new Dictionary(); /// /// Total point width of the vector data /// public int Width { get; } } }