Exemple #1
0
 public GlowFilter(SwfStream stream)
 {
     GlowColor = stream.ReadRGBA();
     BlurX = stream.ReadFixed();
     BlurY = stream.ReadFixed();
     Strength = stream.ReadFixedHalf();
     mFlags = stream.ReadByte();
 }
Exemple #2
0
 public DropShadowFilter(SwfStream stream)
 {
     DropShadowColor = stream.ReadRGBA();
     BlurX = stream.ReadFixed();
     BlurY = stream.ReadFixed();
     Angle = stream.ReadFixed();
     Distance = stream.ReadFixed();
     Strength = stream.ReadFixedHalf();
     mFlags = stream.ReadByte();
 }
Exemple #3
0
 public BevelFilter(SwfStream stream)
 {
     ShadowColor = stream.ReadRGBA();
     HighlightColor = stream.ReadRGBA();
     BlurX = stream.ReadFixed();
     BlurY = stream.ReadFixed();
     Angle = stream.ReadFixed();
     Distance = stream.ReadFixed();
     Strength = stream.ReadFixedHalf();
     mFlags = stream.ReadByte();
 }
        public GradientGlowBevelFilter(SwfStream stream, bool bevel)
        {
            mId = bevel ? ID.GradientBevel : ID.GradientGlow;

            byte numColors = stream.ReadByte();
            GlowColors = stream.ReadRGBAArray(numColors);
            GlowRatios = stream.ReadByteArray(numColors);
            BlurX = stream.ReadFixed();
            BlurY = stream.ReadFixed();
            Strength = stream.ReadFixedHalf();
            mFlags = stream.ReadByte();
        }
Exemple #5
0
        public LineStyle(SwfStream swf, bool hasAlpha, bool isExtended, int index)
        {
            Index = index;

            if (isExtended)
            {
                Width = swf.ReadUShort();
                StartCapStyle = ReadCap(swf);
                JoinStyle = ReadJoin(swf);
                HasFill = swf.ReadBit();
                NoHScale = swf.ReadBit();
                NoVScale = swf.ReadBit();
                PixelHinting = swf.ReadBit();

                swf.ReadBitUInt(5); // Reserved

                NoClose = swf.ReadBit();
                EndCapStyle = ReadCap(swf);

                if (JoinStyle == VGLineJoin.Miter)
                    MiterLimit = swf.ReadFixedHalf();

                if (HasFill)
                    Fill = new FillStyle(swf, hasAlpha, -1);
                else
                    Color = swf.ReadRGBA();
            }
            else
            {
                Width = swf.ReadUShort();
                Color = hasAlpha ? swf.ReadRGBA() : swf.ReadRGB();

                StartCapStyle = VGLineCap.Round;
                EndCapStyle = VGLineCap.Round;
                JoinStyle = VGLineJoin.Round;
                HasFill = false;
                NoHScale = false;
                NoVScale = false;
                PixelHinting = false;
                NoClose = false;
                MiterLimit = 1m;
                Fill = null;
            }

            if (Width < 1) Width = 1;
        }
Exemple #6
0
 public FocalGradientInfo(SwfStream swf, bool hasAlpha)
     : base(swf, hasAlpha)
 {
     FocalPoint = swf.ReadFixedHalf();
 }