Exemplo n.º 1
0
 internal FilterColorMatrix(SwfReader r)
 {
     this.Matrix = new float[20];
     for (int i = 0; i < 20; i++)
     {
         this.Matrix[i] = r.GetFloat32();
     }
 }
Exemplo n.º 2
0
        internal FilterConvolution(SwfReader r)
        {
            MatrixX = (uint)r.GetByte();
            MatrixY = (uint)r.GetByte();
            Divisor = r.GetFloat32();
            Bias    = r.GetFloat32();

            uint mxCount = MatrixX * MatrixY;

            Matrix = new float[mxCount];
            for (int i = 0; i < mxCount; i++)
            {
                Matrix[i] = r.GetFloat32();
            }

            DefaultColor = new RGBA(r.GetByte(), r.GetByte(), r.GetByte(), r.GetByte());

            r.GetBits(6);
            Clamp         = r.GetBit();
            PreserveAlpha = r.GetBit();

            r.Align();
        }