本文整理汇总了C#中SwfDotNet.IO.Tags.RecordHeader.WriteTo方法的典型用法代码示例。如果您正苦于以下问题:C# RecordHeader.WriteTo方法的具体用法?C# RecordHeader.WriteTo怎么用?C# RecordHeader.WriteTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SwfDotNet.IO.Tags.RecordHeader
的用法示例。
在下文中一共展示了RecordHeader.WriteTo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
rh.WriteTo(w);
if (Meta != null)
w.Write(Meta);
w.Flush();
// write to data array
_data = m.ToArray();
}
示例2: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
if (version < 3)
return;
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, GetSizeOf(version));
rh.WriteTo(w);
w.WriteBoolean(HasClipActions());
w.WriteBoolean(HasClipDepth());
w.WriteBoolean(HasName());
w.WriteBoolean(HasRatio());
w.WriteBoolean(HasColorTransform());
w.WriteBoolean(HasMatrix());
w.WriteBoolean(HasCharacter());
w.WriteBoolean(placeFlagMove);
w.Write(depth);
if (HasCharacter())
w.Write(characterId);
if (HasMatrix())
matrix.WriteTo(w);
if (HasColorTransform())
colorTransform.WriteTo(w);
if (HasRatio())
w.Write((ushort)(ratio * 65535.0f));
if (HasName())
w.WriteString(name);
if (HasClipDepth())
w.Write(clipDepth);
if (HasClipActions())
{
w.Write(actionHead);
// ClipActionRecords
foreach (ClipActionRec clpA in clipActions)
w.Write(clpA.GetData(version));
// ClipActionRecords end
if (version >= 6)
w.Write((int)0);
else
w.Write((short)0);
}
w.Flush();
_data = m.ToArray();
}
示例3: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
if (version < 3)
return;
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
rh.WriteTo(w);
w.Write(this.characterId);
w.SynchBits();
if (this.startBounds != null)
this.startBounds.WriteTo(w);
w.SynchBits();
if (this.endBounds != null)
this.endBounds.WriteTo(w);
w.Write(this.offset);
if (this.morphFillStyles != null)
this.morphFillStyles.WriteTo(w);
if (this.morphLineStyles != null)
this.morphLineStyles.WriteTo(w);
ShapeWithStyle.NumFillBits = (uint)morphFillStyles.Count;
ShapeWithStyle.NumLineBits = (uint)morphLineStyles.Count;
if (this.startEdges != null)
this.startEdges.WriteTo(w);
if (this.endEdges != null)
this.endEdges.WriteTo(w);
w.Flush();
// write to data array
_data = m.ToArray();
}
示例4: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
if (version < 3)
return;
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
rh.WriteTo(w);
w.Write(this.buttonId);
w.WriteUBits(0, 7);
w.WriteBoolean(trackAsMenu);
w.Write(this.actionOffset);
if (characters != null)
{
IEnumerator butts = characters.GetEnumerator();
while (butts.MoveNext())
{
((ButtonRecord)butts.Current).WriteTo(w, TagCodeEnum.DefineButton2);
w.SynchBits();
}
}
w.Write((byte)0);
if (actions != null)
{
for (int i = 0; i < actions.Count; i++)
{
ButtonCondaction buttCon = actions[i];
if (i == actions.Count - 1)
w.Write((ushort)0);
else
{
int size = buttCon.GetSizeOf();
w.Write((ushort)size);
}
buttCon.WriteTo(w);
}
}
w.Flush();
// write to data array
_data = m.ToArray();
}
示例5: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
if (version < 7)
return;
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, 4);
rh.WriteTo(w);
w.Write(recursion);
w.Write(timeout);
w.Flush();
// write to data array
_data = m.ToArray();
}
示例6: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
if (version < 6)
return;
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
rh.WriteTo(w);
w.Write(this.characterId);
w.Write(this.numFrames);
w.Write(this.width);
w.Write(this.height);
w.WriteUBits(0, 5);
w.WriteUBits(videoFlagsDeblocking, 2);
w.WriteBoolean(videoFlagsSmoothing);
w.Write(this.codecId);
w.Flush();
// write to data array
_data = m.ToArray();
}
示例7: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
rh.WriteTo(w);
w.Write(characterId);
w.Write(depth);
if (this.matrix != null)
this.matrix.WriteTo(w);
if (this.colorTransform != null)
this.colorTransform.WriteTo(w);
w.Flush();
// write to data array
_data = m.ToArray();
}
示例8: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
rh.WriteTo(w);
w.WriteUBits(0, 4);
w.WriteUBits(playbackSoundRate, 2);
w.WriteUBits(playbackSoundSize, 1);
w.WriteUBits(playbackSoundType, 1);
w.WriteUBits(streamSoundCompression, 4);
w.WriteUBits(streamSoundRate, 2);
w.WriteUBits(streamSoundSize, 1);
w.WriteUBits(streamSoundType, 1);
w.Write(streamSoundSampleCount);
if (streamSoundCompression == 2)
w.Write(latencySeek);
w.Flush();
// write to data array
_data = m.ToArray();
}
示例9: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
rh.WriteTo(w);
w.Write(this.fontId);
//TODO: calcule offset !!
if (offsetTable != null)
{
IEnumerator offsets = offsetTable.GetEnumerator();
while (offsets.MoveNext())
w.Write((ushort)offsets.Current);
}
ShapeWithStyle.NumFillBits = 0;
ShapeWithStyle.NumLineBits = 0;
glyphShapesTable.WriteTo(w);
w.Flush();
// write to data array
_data = m.ToArray();
}
示例10: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
if (version < VersionCompatibility)
return;
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
rh.WriteTo(w);
w.Write(this.characterId);
if (rect != null)
rect.WriteTo(w);
if (matrix != null)
matrix.WriteTo(w);
w.Write(TextRecordCollection.GLYPH_BITS);
w.Write(TextRecordCollection.ADVANCE_BITS);
if (textRecords != null)
{
IEnumerator records = textRecords.GetEnumerator();
while (records.MoveNext())
((TextRecord)records.Current).WriteTo(w);
}
w.Write((byte)0);
w.Flush();
// write to data array
_data = m.ToArray();
}
示例11: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
if (version < this.versionCompatibility)
return;
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(this.TagCode, GetSizeOf(), true);
rh.WriteTo(w);
w.Write(this.shapeId);
rect.WriteTo(w);
shape.WriteTo(w);
w.Flush();
// write to data array
_data = m.ToArray();
}
示例12: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
if (version < 5)
return;
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
int lenght = 2 + url.Length;
if (exportedCharacters != null)
lenght += Assert.GetSizeOf(exportedCharacters);
RecordHeader rh = new RecordHeader(TagCode, lenght);
rh.WriteTo(w);
w.Write(url);
w.Write((ushort)exportedCharacters.Count);
IEnumerator asserts = exportedCharacters.GetEnumerator();
while (asserts.MoveNext())
{
Assert assert = (Assert)asserts.Current;
assert.WriteTo(w);
}
w.Flush();
// write to data array
_data = m.ToArray();
}
示例13: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
if (version < 6)
return;
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
rh.WriteTo(w);
w.Write(this.streamId);
w.Write(this.frameNum);
if (video != null)
video.WriteTo(w);
// write to data array
w.Flush();
_data = m.ToArray();
}
示例14: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
if (version < 2)
return;
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
rh.WriteTo(w);
w.Write(this.buttonId);
if (buttonColorTransform != null)
buttonColorTransform.WriteTo(w);
w.Flush();
// write to data array
_data = m.ToArray();
}
示例15: UpdateData
/// <summary>
/// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
/// </summary>
public override void UpdateData(byte version)
{
MemoryStream m = new MemoryStream();
BufferedBinaryWriter w = new BufferedBinaryWriter(m);
int length = 0;
if (soundData != null)
length += soundData.Length;
RecordHeader rh = new RecordHeader(TagCode, length);
rh.WriteTo(w);
if (soundData != null)
w.Write(soundData);
w.Flush();
// write to data array
_data = m.ToArray();
}