Example #1
0
        public override void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            base.loadFrom(reader, ctx);

            int b = reader.ReadInt32();

            if (b == 1)
            {
                _blend           = new Blend();
                _blend.Factors   = ctx.loadFloatArray();
                _blend.Positions = ctx.loadFloatArray();
            }
            else
            {
                _blend = null;
            }

            _linearColors[0] = ctx.loadColor();
            _linearColors[1] = ctx.loadColor();

            b = reader.ReadInt32();
            if (b == 1)
            {
                _interpolationColors           = new ColorBlend();
                _interpolationColors.Colors    = ctx.loadColorArray();
                _interpolationColors.Positions = ctx.loadFloatArray();
            }
            else
            {
                _interpolationColors = null;
            }

            _angle = (float)reader.ReadDouble();
        }
Example #2
0
		public override void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			base.loadFrom(reader, ctx);

			int b = reader.ReadInt32();
			if(b == 1)
			{
				_blend = new Blend();
				_blend.Factors = ctx.loadFloatArray();
				_blend.Positions = ctx.loadFloatArray();
			}
			else
			{
				_blend = null;
			}

			_linearColors[0] = ctx.loadColor();
			_linearColors[1] = ctx.loadColor();

			b = reader.ReadInt32();
			if(b == 1)
			{
				_interpolationColors = new ColorBlend();
				_interpolationColors.Colors = ctx.loadColorArray();
				_interpolationColors.Positions = ctx.loadFloatArray();
			}
			else
			{
				_interpolationColors = null;
			}

			_angle = (float)reader.ReadDouble();
		}