示例#1
0
        public override void saveTo(BinaryWriter writer, PersistContext ctx)
        {
            base.saveTo(writer, ctx);

            if (_blend != null)
            {
                writer.Write((int)1);
                ctx.saveFloatArray(_blend.Factors);
                ctx.saveFloatArray(_blend.Positions);
            }
            else
            {
                writer.Write((int)0);
            }

            ctx.saveColor(_linearColors[0]);
            ctx.saveColor(_linearColors[1]);

            if (_interpolationColors != null)
            {
                writer.Write((int)1);
                ctx.saveColorArray(_interpolationColors.Colors);
                ctx.saveFloatArray(_interpolationColors.Positions);
            }
            else
            {
                writer.Write((int)0);
            }

            writer.Write((double)_angle);
        }
示例#2
0
 public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
 {
     ctx.saveReference(this, _brush, 1);
     ctx.saveColor(_color);
     ctx.saveFloatArray(_compoundArray);
     writer.Write((int)_dashStyle);
     ctx.saveFloatArray(_dashPattern);
     writer.Write((double)_dashOffset);
     writer.Write((double)_width);
     writer.Write((int)_lineJoin);
     writer.Write((double)_miterLimit);
 }
示例#3
0
文件: GDI.cs 项目: ChrisMoreton/Test3
		public override void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			base.saveTo(writer, ctx);

			if(_blend != null)
			{
				writer.Write((int)1);
				ctx.saveFloatArray(_blend.Factors);
				ctx.saveFloatArray(_blend.Positions);
			}
			else
			{
				writer.Write((int)0);
			}

			ctx.saveColor(_linearColors[0]);
			ctx.saveColor(_linearColors[1]);
			
			if(_interpolationColors != null)
			{
				writer.Write((int)1);
				ctx.saveColorArray(_interpolationColors.Colors);
				ctx.saveFloatArray(_interpolationColors.Positions);
			}
			else
			{
				writer.Write((int)0);
			}

			writer.Write((double)_angle);
		}
示例#4
0
文件: GDI.cs 项目: ChrisMoreton/Test3
		public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			ctx.saveReference(this, _brush, 1);
			ctx.saveColor(_color);
			ctx.saveFloatArray(_compoundArray);
			writer.Write((int)_dashStyle);
			ctx.saveFloatArray(_dashPattern);
			writer.Write((double)_dashOffset);
			writer.Write((double)_width);
			writer.Write((int)_lineJoin);
			writer.Write((double)_miterLimit);
		}
示例#5
0
			public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
			{
				int num = data.GetLength(0);
				writer.Write(num);
				for (int i = 0; i < num; ++i)
					ctx.saveFloatArray(data[i]);
			}
示例#6
0
		public override void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			ctx.saveFloatArray(pts);
		}