Exemplo n.º 1
0
            public void Read(TTFReader r, bool readFormat)
            {
                if (readFormat == true)
                {
                    r.ReadInt(out this.posFormat);
                }

                r.ReadInt(out this.coverageOffset);
                r.ReadInt(out this.valueFormat1);
                r.ReadInt(out this.valueFormat2);
                r.ReadInt(out this.classDef1Offset);
                r.ReadInt(out this.classDef2Offset);
                r.ReadInt(out this.class1Count);
                r.ReadInt(out this.class2Count);

                this.class1Record = new List <Class1Record>();
                for (int i = 0; i < this.class1Count; ++i)
                {
                    Class1Record c1r = new Class1Record();
                    c1r.Read(r, this.class2Count);
                    this.class1Record.Add(c1r);
                }
            }
Exemplo n.º 2
0
                public Class1Record GetClass1Record(uint i)
                {
                    if (PosFormat != 2)
                    {
                        throw new System.InvalidOperationException();
                    }

                    Class1Record c1r = null;

                    if (i < Class1Count)
                    {
                        ushort sizeofClass1Record = (ushort)( Class2Count * ValueRecord.SizeOfValueRecord(ValueFormat2));
                        uint offset = m_offsetPairPos + (uint)FieldOffsets.Class1Records + i*sizeofClass1Record;
                        c1r = new Class1Record(offset, m_bufTable, Class2Count, m_offsetPairPos, ValueFormat1, ValueFormat2);
                    }

                    return c1r;
                }