Пример #1
0
        public override Object Clone()
        {
            FbiRecord rec = new FbiRecord();

            rec.field_1_xBasis           = field_1_xBasis;
            rec.field_2_yBasis           = field_2_yBasis;
            rec.field_3_heightBasis      = field_3_heightBasis;
            rec.field_4_scale            = field_4_scale;
            rec.field_5_indexToFontTable = field_5_indexToFontTable;
            return(rec);
        }
Пример #2
0
        public void TestLoad()
        {

            FbiRecord record = new FbiRecord(TestcaseRecordInputStream.Create((short)0x1060, data));
            Assert.AreEqual(0x1a28, record.XBasis);
            Assert.AreEqual(0x0f9c, record.YBasis);
            Assert.AreEqual(0xc8, record.HeightBasis);
            Assert.AreEqual(0x00, record.Scale);
            Assert.AreEqual(0x05, record.IndexToFontTable);


            Assert.AreEqual(14, record.RecordSize);
        }
Пример #3
0
        public void TestStore()
        {
            FbiRecord record = new FbiRecord();
            record.XBasis = ((short)0x1a28);
            record.YBasis = ((short)0x0f9c);
            record.HeightBasis = ((short)0xc8);
            record.Scale = ((short)0x00);
            record.IndexToFontTable = ((short)0x05);

            byte[] recordBytes = record.Serialize();
            Assert.AreEqual(recordBytes.Length - 4, data.Length);
            for (int i = 0; i < data.Length; i++)
                Assert.AreEqual(data[i], recordBytes[i + 4], "At offset " + i);
        }
Пример #4
0
 private FbiRecord CreateFontBasisRecord1()
 {
     FbiRecord r = new FbiRecord();
     r.XBasis = ((short)9120);
     r.YBasis = ((short)5640);
     r.HeightBasis = ((short)200);
     r.Scale = ((short)0);
     r.IndexToFontTable = ((short)5);
     return r;
 }
Пример #5
0
 private static FbiRecord CreateFontBasisRecord1()
 {
     FbiRecord r = new FbiRecord();
     r.XBasis = ((short)9720);
     r.YBasis = ((short)4350);
     r.HeightBasis = ((short)240);
     r.Scale = ((short)0);
     r.IndexToFontTable = ((short)24);
     return r;
 }
Пример #6
0
        public override Object Clone()
        {
            FbiRecord rec = new FbiRecord();

            rec.field_1_xBasis = field_1_xBasis;
            rec.field_2_yBasis = field_2_yBasis;
            rec.field_3_heightBasis = field_3_heightBasis;
            rec.field_4_scale = field_4_scale;
            rec.field_5_indexToFontTable = field_5_indexToFontTable;
            return rec;
        }