private void  encodeGradRecord(GradRecord record, SwfEncoder w, int shape)
		{
			w.writeUI8(record.ratio);
			if ((shape == flash.swf.TagValues_Fields.stagDefineShape3) || (shape == flash.swf.TagValues_Fields.stagDefineShape6))
				encodeRGBA(record.color, w);
			else
				encodeRGB(record.color, w);
		}
示例#2
0
		private System.String formatGradient(GradRecord[] records, bool alpha)
		{
			System.Text.StringBuilder b = new System.Text.StringBuilder();
			for (int i = 0; i < records.Length; i++)
			{
				b.Append(records[i].ratio);
				b.Append(' ');
				b.Append(alpha?printRGBA(records[i].color):printRGB(records[i].color));
				if (i + 1 < records.Length)
					b.Append(' ');
			}
			return b.ToString();
		}