Example #1
0
 BaseFilter IFilterVisitor <ISwfStreamReader, BaseFilter> .Visit(DropShadowFilter filter, ISwfStreamReader reader)
 {
     filter.Color           = reader.ReadRGBA();
     filter.BlurX           = reader.ReadFixed();
     filter.BlurY           = reader.ReadFixed();
     filter.Angle           = reader.ReadFixed();
     filter.Distance        = reader.ReadFixed();
     filter.Strength        = reader.ReadFixedPoint8();
     filter.InnerShadow     = reader.ReadBit();
     filter.Knockout        = reader.ReadBit();
     filter.CompositeSource = reader.ReadBit();
     filter.Passes          = reader.ReadUnsignedBits(5);
     return(filter);
 }
Example #2
0
        object IFilterVisitor <ISwfStreamWriter, object> .Visit(DropShadowFilter filter, ISwfStreamWriter writer)
        {
            writer.WriteRGBA(ref filter.Color);
            writer.WriteFixed(filter.BlurX);
            writer.WriteFixed(filter.BlurY);
            writer.WriteFixed(filter.Angle);

            writer.WriteFixed(filter.Distance);
            writer.WriteFixedPoint8(filter.Strength);
            writer.WriteBit(filter.InnerShadow);
            writer.WriteBit(filter.Knockout);
            writer.WriteBit(filter.CompositeSource);

            writer.WriteUnsignedBits(filter.Passes, 5);
            return(null);
        }