示例#1
0
        public override void ReadFromBinary(IBinaryReader reader)
        {
            Style = reader.ReadIndex();

            var length = (Style == 1) ? 1 : 2;

            for (var i = 0; i < length; i++)
            {
                GeoX.Add(reader.ReadSizeSpecification(_container.InteriorStyleSpecificationMode));
                GeoY.Add(reader.ReadSizeSpecification(_container.InteriorStyleSpecificationMode));
            }

            var numberOfStages = reader.ReadInt();

            for (var i = 0; i < numberOfStages; i++)
            {
                StageDesignators.Add(reader.ReadReal());
            }

            var colorLength = (Style == 3) ? 3 : numberOfStages + 1;

            for (var i = 0; i < colorLength; i++)
            {
                Colors.Add(reader.ReadColor());
            }
        }
示例#2
0
        public InterpolatedInterior(CgmFile container, int style, IEnumerable <double> geoX, IEnumerable <double> geoY, IEnumerable <double> stageDesignators, IEnumerable <CgmColor> colors)
            : this(container)
        {
            Style = style;
            GeoX.AddRange(geoX);
            GeoY.AddRange(geoY);
            StageDesignators.AddRange(stageDesignators);
            Colors.AddRange(colors);

            if (GeoX.Count != GeoY.Count)
            {
                throw new ArgumentException("Amount of geoX does not match geoY!");
            }
        }