public static ColorTransformRGBA ReadColorTransformRGBA(this ISwfStreamReader reader) { ColorTransformRGBA transform; reader.ReadColorTransformRGBA(out transform); return(transform); }
public static ButtonRecordEx ReadButtonRecordEx(this ISwfStreamReader reader) { var button = new ButtonRecordEx(); button.Reserved = (byte)reader.ReadUnsignedBits(2); var hasBlendMode = reader.ReadBit(); var hasFilterList = reader.ReadBit(); button.StateHitTest = reader.ReadBit(); button.StateDown = reader.ReadBit(); button.StateOver = reader.ReadBit(); button.StateUp = reader.ReadBit(); var isEnd = !hasBlendMode && !hasFilterList && button.IsEndButton; if (!isEnd) { button.CharacterID = reader.ReadUInt16(); button.PlaceDepth = reader.ReadUInt16(); button.PlaceMatrix = reader.ReadMatrix(); button.ColorTransform = reader.ReadColorTransformRGBA(); reader.AlignToByte(); if (hasFilterList) { reader.ReadFilterList(button.Filters); } if (hasBlendMode) { button.BlendMode = (BlendMode)reader.ReadByte(); } } return(button); }