예제 #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);
		}