当前位置: 首页>>代码示例>>C#>>正文


C# SwfWriter.AppendString方法代码示例

本文整理汇总了C#中DDW.Swf.SwfWriter.AppendString方法的典型用法代码示例。如果您正苦于以下问题:C# SwfWriter.AppendString方法的具体用法?C# SwfWriter.AppendString怎么用?C# SwfWriter.AppendString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DDW.Swf.SwfWriter的用法示例。


在下文中一共展示了SwfWriter.AppendString方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ToSwf

        public void ToSwf(SwfWriter w)
        {
            w.AppendByte((byte)ActionKind.GetURL);
            w.AppendUI16(Length - 3);// don't incude this part

            w.AppendString(UrlString);
            w.AppendString(TargetString);
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:8,代码来源:GetURL.cs

示例2: ToSwf

        public void ToSwf(SwfWriter w)
        {
            w.AppendByte((byte)ActionKind.GoToLabel);
            w.AppendUI16(Length - 3); // don't incude def byte and len

            w.AppendString(Label);
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:7,代码来源:GoToLabel.cs

示例3: ToSwf

        public void ToSwf(SwfWriter w)
        {
            w.AppendByte((byte)ActionKind.SetTarget);
            w.AppendUI16(Length - 3); // don't incude def byte and len

            w.AppendString(TargetName);
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:7,代码来源:SetTarget.cs

示例4: ToSwf

        public void ToSwf(SwfWriter w)
        {
            uint start = (uint)w.Position;
            w.AppendTagIDAndLength(this.TagType, 0, true);

            w.AppendUI16((uint)Exports.Count);
            foreach (uint index in Exports.Keys)
            {
                w.AppendUI16(index);
                w.AppendString(Exports[index]);
            }

            w.ResetLongTagLength(this.TagType, start, true);
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:14,代码来源:ExportAssetsTag.cs

示例5: ToSwf

        public virtual void ToSwf(SwfWriter w)
        {
            uint start = (uint)w.Position;
            w.AppendTagIDAndLength(this.TagType, 0, true);

            uint len = (uint)Ids.Length;
            w.AppendUI16(len);

            for (int i = 0; i < len; i++)
            {
                w.AppendUI16(Ids[i]);
                w.AppendString(Names[i]);
            }

            w.ResetLongTagLength(this.TagType, start, true);
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:16,代码来源:SymbolClassTag.cs

示例6: ToSwf

        public void ToSwf(SwfWriter w)
        {
            uint start = (uint)w.Position;
            w.AppendTagIDAndLength(this.TagType, 0, true);

            w.AppendUI16(CharacterID);
            Bounds.ToSwf(w);

            w.AppendBit(HasText);
            w.AppendBit(WordWrap);
            w.AppendBit(Multiline);
            w.AppendBit(Password);
            w.AppendBit(ReadOnly);
            w.AppendBit(HasTextColor);
            w.AppendBit(HasMaxLength);
            w.AppendBit(HasFont);
            w.AppendBit(false);// resreved
            w.AppendBit(AutoSize);
            w.AppendBit(HasLayout);
            w.AppendBit(NoSelect);
            w.AppendBit(Border);
            w.AppendBit(false);// resreved
            w.AppendBit(HTML);
            w.AppendBit(UseOutlines);

            if (HasFont)
            {
                w.AppendUI16(FontID);
                w.AppendUI16(FontHeight);
            }
            if (HasTextColor)
            {
                w.AppendByte((byte)TextColor.R);
                w.AppendByte((byte)TextColor.G);
                w.AppendByte((byte)TextColor.B);
                w.AppendByte((byte)TextColor.A);
            }
            if (HasMaxLength)
            {
                w.AppendUI16(MaxLength);
            }
            if (HasLayout)
            {
                w.AppendByte((byte)Align);
                w.AppendUI16(LeftMargin);
                w.AppendUI16(RightMargin);
                w.AppendUI16(Indent);
                w.AppendUI16((uint)Leading);
            }

            w.AppendString(VariableName);

            if (HasText)
            {
                w.AppendString(InitialText);
            }

            w.ResetLongTagLength(this.TagType, start, true);
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:59,代码来源:DefineEditTextTag.cs

示例7: ToSwf

        public void ToSwf(SwfWriter w)
        {
            w.AppendByte((byte)ActionKind.DefineFunction);
            w.AppendUI16(Length - 3); // don't incude def byte and len

            w.AppendString(FunctionName);
            w.AppendUI16((uint)Params.Length);
            for (int i = 0; i < Params.Length; i++)
            {
                w.AppendString(Params[i]);
            }

            w.AppendUI16(CodeSize); // temp
            long startPos = w.Position;

            for (int i = 0; i < Statements.Count; i++)
            {
                Statements[i].ToSwf(w);
            }

            // adjust code size
            long curPos = w.Position;
            if (codeSize != (curPos - startPos))
            {
                codeSize = (uint)(curPos - startPos);
                w.Position = startPos - 2;
                w.AppendUI16(CodeSize); // acutal
                w.Position = curPos;
            }
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:30,代码来源:DefineFunction.cs

示例8: ToSwf

 public void ToSwf(SwfWriter w)
 {
     w.AppendTagIDAndLength(this.TagType, (uint)TargetName.Length + 1, true);
     w.AppendString(TargetName); // todo: check for unicode implications on labels
 }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:5,代码来源:FrameLabelTag.cs

示例9: ToSwf

 public void ToSwf(SwfWriter w)
 {
     w.AppendByte((byte)PrimitiveType);
     w.AppendString(StringValue);
 }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:5,代码来源:PrimitiveString.cs

示例10: ToSwf

        public void ToSwf(SwfWriter w, bool isSwf6Plus)
        {
            uint start = (uint)w.Position;
            w.AppendTagIDAndLength(this.TagType, 0, true);

            w.AppendBit(HasClipActions);
            w.AppendBit(HasClipDepth);
            w.AppendBit(HasName);
            w.AppendBit(HasRatio);
            w.AppendBit(HasColorTransform);
            w.AppendBit(HasMatrix);
            w.AppendBit(HasCharacter);
            w.AppendBit(Move);

            w.AppendUI16(Depth);

            if (HasCharacter)
            {
                w.AppendUI16(Character);
            }
            if (HasMatrix)
            {
                Matrix.ToSwf(w);
            }
            if (HasColorTransform)
            {
                ColorTransform.ToSwf(w, true);
            }
            if (HasRatio)
            {
                w.AppendUI16(Ratio);
            }
            if (HasName)
            {
                w.AppendString(Name);
            }
            if (HasClipDepth)
            {
                w.AppendUI16(ClipDepth);
            }

            if (HasClipActions)
            {
                ClipActions.ToSwf(w, isSwf6Plus);
            }

            //w.ResetLongTagLength(this.TagType, start, true);
            // this may be always long tag?
            if (HasClipActions || HasName)
            {
                w.ResetLongTagLength(this.TagType, start, true); // flash always makes long tags is clip actions are present
            }
            else
            {
                w.ResetLongTagLength(this.TagType, start);
            }
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:57,代码来源:PlaceObject2Tag.cs

示例11: ToSwf

        public void ToSwf(SwfWriter w)
        {
            w.AppendByte((byte)ActionKind.ConstantPool);

            long lenPos = w.Position;
            w.AppendUI16(0); // length

            w.AppendUI16((uint)Constants.Length);

            for (int i = 0; i < Constants.Length; i++)
            {
                w.AppendString(Constants[i]);
            }
            long temp = w.Position;
            w.Position = lenPos;
            w.AppendUI16((uint)(temp - lenPos - 2)); // skip len bytes
            w.Position = temp;
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:18,代码来源:ConstantPool.cs

示例12: ToSwf

        public void ToSwf(SwfWriter w)
        {
            uint start = (uint)w.Position;
            w.AppendTagIDAndLength(this.TagType, 0, true);

            w.AppendUI16(FontId);

            w.AppendBit(FontFlagsHasLayout);
            w.AppendBit(FontFlagsShiftJIS);
            w.AppendBit(FontFlagsSmallText);
            w.AppendBit(FontFlagsANSI);
            w.AppendBit(FontFlagsWideOffsets);
            w.AppendBit(FontFlagsWideCodes);
            w.AppendBit(FontFlagsItalic);
            w.AppendBit(FontFlagsBold);
            w.Align();

            w.AppendByte((byte)LanguageCode);
            w.AppendByte((byte)(FontName.Length + 1)); // add trailing /0
            w.AppendString(FontName, (uint)FontName.Length);

            w.AppendUI16(NumGlyphs);
            for (int i = 0; i < this.NumGlyphs; i++)
            {
                if (this.FontFlagsWideOffsets)
                {
                    w.AppendUI32(this.OffsetTable[i]);
                }
                else
                {
                    w.AppendUI16(this.OffsetTable[i]);
                }
            }

            if (this.FontFlagsWideOffsets)
            {
                w.AppendUI32(this.CodeTableOffset);
            }
            else
            {
                w.AppendUI16(this.CodeTableOffset);
            }

            for (int i = 0; i < this.NumGlyphs; i++)
            {
                GlyphShapeTable[i].ToSwf(w);
            }

            for (int i = 0; i < this.NumGlyphs; i++)
            {
                w.AppendUI16(this.CodeTable[i]);
            }

            if (this.FontFlagsHasLayout)
            {
                w.AppendInt16(FontAscent);
                w.AppendInt16(FontDescent);
                w.AppendInt16(FontLeading);

                for (int i = 0; i < this.NumGlyphs; i++)
                {
                    w.AppendInt16(this.FontAdvanceTable[i]);
                }

                for (int i = 0; i < this.NumGlyphs; i++)
                {
                    this.FontBoundsTable[i].ToSwf(w);
                }

                w.AppendUI16(this.KerningCount);

                if(this.FontFlagsWideCodes)
                {
                    for (int i = 0; i < this.KerningCount; i++)
                    {
                        w.AppendUI16(this.FontKerningTable[i].FontKerningCode1);
                        w.AppendUI16(this.FontKerningTable[i].FontKerningCode2);
                        w.AppendInt16(this.FontKerningTable[i].FontKerningAdjustment);
                    }
                }
                else
                {
                    for (int i = 0; i < this.KerningCount; i++)
                    {
                        w.AppendByte((byte)this.FontKerningTable[i].FontKerningCode1);
                        w.AppendByte((byte)this.FontKerningTable[i].FontKerningCode2);
                        w.AppendInt16(this.FontKerningTable[i].FontKerningAdjustment);
                    }
                }
            }

            w.ResetLongTagLength(this.TagType, start, true);
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:93,代码来源:DefineFont2_3.cs

示例13: ToSwf

        public void ToSwf(SwfWriter w)
        {
            w.AppendByte((byte)ActionKind.DefineFunction2);
            w.AppendUI16(Length - 3); // don't incude def byte and len

            w.AppendString(FunctionName);
            w.AppendUI16((uint)Parameters.Count);
            w.AppendByte((byte)RegisterCount);

            w.AppendBit((Preloads & PreloadFlags.Parent) > 0);
            w.AppendBit((Preloads & PreloadFlags.Root) > 0);
            w.AppendBit(SuppressSuperFlag);
            w.AppendBit((Preloads & PreloadFlags.Super) > 0);
            w.AppendBit(SuppressArgumentsFlag);
            w.AppendBit((Preloads & PreloadFlags.Arguments) > 0);
            w.AppendBit(SuppressThisFlag);
            w.AppendBit((Preloads & PreloadFlags.This) > 0);
            w.AppendBits(0, 7);
            w.AppendBit((Preloads & PreloadFlags.Global) > 0);

            foreach (KeyValuePair<uint, string> d in Parameters)
            {
                w.AppendByte((byte)d.Key);
                w.AppendString(d.Value);
            }

            w.AppendUI16(CodeSize); // temp
            long startPos = w.Position;

            for (int i = 0; i < Statements.Count; i++)
            {
                Statements[i].ToSwf(w);
            }

            // adjust code size
            long curPos = w.Position;
            if (codeSize != (curPos - startPos))
            {
                codeSize = (uint)(curPos - startPos);
                w.Position = startPos - 2;
                w.AppendUI16(CodeSize); // acutal
                w.Position = curPos;
            }
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:44,代码来源:DefineFunction2.cs

示例14: ToSwf

        public override void ToSwf(SwfWriter w)
        {
            uint start = (uint)w.Position;
            w.AppendTagIDAndLength(this.TagType, 0, true);

            w.AppendBit(HasClipActions);
            w.AppendBit(HasClipDepth);
            w.AppendBit(HasName);
            w.AppendBit(HasRatio);
            w.AppendBit(HasColorTransform);
            w.AppendBit(HasMatrix);
            w.AppendBit(HasCharacter);
            w.AppendBit(Move);

            w.AppendBits(0, 5); // reserved
            w.AppendBit(PlaceFlagHasCacheAsBitmap);
            w.AppendBit(PlaceFlagHasBlendMode);
            w.AppendBit(PlaceFlagHasFilterList);

            w.AppendUI16(Depth);

            if (HasCharacter)
            {
                w.AppendUI16(Character);
            }
            if (HasMatrix)
            {
                Matrix.ToSwf(w);
            }
            if (HasColorTransform)
            {
                ColorTransform.ToSwf(w, true);
            }
            if (HasRatio)
            {
                w.AppendUI16(Ratio);
            }
            if (HasName)
            {
                w.AppendString(Name);
            }
            if (HasClipDepth)
            {
                w.AppendUI16(ClipDepth);
            }

            if (PlaceFlagHasFilterList)
            {
                w.AppendByte((byte)FilterList.Count);
                for (int i = 0; i < FilterList.Count; i++)
                {
                    FilterList[i].ToSwf(w);
                }
            }
            if (PlaceFlagHasBlendMode)
            {
                w.AppendByte((byte)BlendMode);
            }

            if (HasClipActions)
            {
                //todo: ClipActions = new ClipActions();
            }

            w.ResetLongTagLength(this.TagType, start);
        }
开发者ID:Hamsand,项目名称:Swf2XNA,代码行数:66,代码来源:PlaceObject3Tag.cs


注:本文中的DDW.Swf.SwfWriter.AppendString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。