/// <summary> /// /// </summary> /// <param name="input"></param> /// <param name="caller"></param> public virtual void Parse(Stream input, TagTypes caller) { BinaryReader br = new BinaryReader(input); this._lineStyleCount = br.ReadByte(); if (caller.Equals(TagTypes.DefineShape4)) { if (this._lineStyleCount.Equals(0xFF)) { this._lineStyleCountExtended = br.ReadUInt16(); LineStyle2 temp = null; for (byte i = 0; i < this._lineStyleCountExtended; i++) { temp = new LineStyle2(this._SwfVersion); try { temp.Parse(input, caller); } catch (SwfFormatException e) { throw e; } this._lineStyles.Add(temp); } } else { LineStyle2 temp = null; for (byte i = 0; i < this._lineStyleCount; i++) { temp = new LineStyle2(this._SwfVersion); try { temp.Parse(input, caller); } catch (SwfFormatException e) { throw e; } this._lineStyles.Add(temp); } } } else { if (this._lineStyleCount.Equals(0xFF)) { this._lineStyleCountExtended = br.ReadUInt16(); LineStyle temp = null; for (byte i = 0; i < this._lineStyleCountExtended; i++) { temp = new LineStyle(this._SwfVersion); try { temp.Parse(input, caller); } catch (SwfFormatException e) { throw e; } this._lineStyles.Add(temp); } } else { for (byte i = 0; i < this._lineStyleCount; i++) { LineStyle temp = new LineStyle(this._SwfVersion); try { temp.Parse(input, caller); } catch (SwfFormatException e) { throw e; } this._lineStyles.Add(temp); } } } }