Example #1
0
        static void FillTable(TIFFFaxTabEnt[] T, int Size, proto P, S State)
        {
            int limit = 1 << Size;

            byte width = (byte)(P.val & 15);
            uint param = (uint)(P.val >> 4);
            int  incr  = 1 << width;

            for (int code = P.code; code < limit; code += incr)
            {
                T[code].State = State;
                T[code].Width = width;
                T[code].Param = param;
            }
        }
Example #2
0
        static void FillTable(TIFFFaxTabEnt[] T, int Size, proto[] Ps, S State)
        {
            int limit=1<<Size;

            foreach(proto P in Ps)
            {
                byte width=(byte)(P.val&15);
                uint param=(uint)(P.val>>4);
                int incr=1<<width;
                for(int code=P.code; code<limit; code+=incr)
                {
                    T[code].State=State;
                    T[code].Width=width;
                    T[code].Param=param;
                }
            }
        }