SwfDotNet.IO.Tags.Types.TextRecord.GetSizeOf C# (CSharp) Method

GetSizeOf() public method

Gets the size of.
public GetSizeOf ( ) : int
return int
        public int GetSizeOf()
        {
            bool styleFlagsHasFont = HasFont();
            bool styleFlagsHasColor = HasColor();
            bool styleFlagsHasYOffset = HasYOffset();
            bool styleFlagsHasXOffset = HasXOffset();

            int res = 1;
            if (styleFlagsHasFont)
                res += 2;
            if (styleFlagsHasColor)
                res += textColor.GetSizeOf();
            if (styleFlagsHasXOffset)
                res += 2;
            if (styleFlagsHasYOffset)
                res += 2;
            if (styleFlagsHasFont)
                res += 2;
            res++;
            if (this.glyphEntries != null)
                res += glyphEntries.GetSizeOf();
            return res;
        }