public DRectangle Read(BinaryReader br) { // read each field Origin = new DPoint2d().Read(br); Corner = new DPoint2d().Read(br); return(this); }
public TestStyleTableElm Read(BinaryReader br) { // read each field Ehdr = new Elm_hdr().Read(br); StyleId = br.ReadUInt64(); // 0x20 FontNumber = br.ReadUInt32(); // 0x28 Dummy1 = br.ReadUInt32(); // 0x2c Width = br.ReadDouble(); // 0x30 Height = br.ReadDouble(); // 0x38 Slant = br.ReadDouble(); // 0x40 LineSpacing = br.ReadDouble(); // 0x48 InterCharSpacing = br.ReadDouble(); // 0x50 UnderlineOffset = br.ReadDouble(); // 0x58 OverlineOffset = br.ReadDouble(); // 0x60 Dummy2 = br.ReadDouble(); // 0x68 LineOffset = new DPoint2d().Read(br); // 0x70 Justification = br.ReadUInt16(); // 0x80 Dummy8 = br.ReadUInt16(); // 0x82 LineLength = br.ReadUInt16(); // 0x84 Dummy9 = br.ReadUInt16(); // 0x86 Dummy10 = br.ReadUInt16(); // 0x88 Dummy11 = br.ReadUInt16(); // 0x8a BackgroudWeight = br.ReadInt32(); // 0x8c BackgroudColor = br.ReadInt32(); // 0x90 BackgroudFillColor = br.ReadInt32(); // 0x94 BackgroundBorder = new DPoint2d().Read(br); // 0x98 UnderlineStyle = br.ReadInt32(); // 0xa8 UnderlineWeight = br.ReadUInt32(); // 0xac UnderlineColor = br.ReadUInt32(); // 0xb0 OverlineStyle = br.ReadInt32(); // 0xb4 OverlineWeight = br.ReadUInt32(); // 0xb8 OverlineColor = br.ReadUInt32(); // 0xbc Dummy4 = br.ReadUInt32(); // 0xc0 Dummy5 = br.ReadUInt32(); // 0xc4 Dummy6 = br.ReadUInt32(); // 0xc8 Dummy7 = br.ReadUInt32(); // 0xcc ColorIndex = br.ReadUInt32(); // 0xd0 Dummy12 = br.ReadUInt32(); // 0xd4 Dummy13 = br.ReadUInt32(); // 0xd8 Dummy14 = br.ReadUInt32(); // 0xdc Dummy15 = br.ReadUInt32(); // 0xe0 Dummy16 = br.ReadUInt32(); // 0xe4 TextStyleNameLength = br.ReadUInt16(); // 0xe8 var namePosition = br.BaseStream.Position; var Data = br.ReadBytes(TextStyleNameLength); if ((TextStyleNameLength >= 4) && (Data[0] == 0xff) && (Data[1] == 0xfe) && (Data[2] == 0x01) && (Data[3] == 0x00)) { // skip UTF32 LE BOM br.BaseStream.Seek(namePosition + 4, SeekOrigin.Begin); TextStyleNameLength -= 4; } else { br.BaseStream.Seek(namePosition, SeekOrigin.Begin); } TextStyleName = System.Text.Encoding.UTF8.GetString(br.ReadBytes(TextStyleNameLength)); Linkages = V8Linkages.V8GetLinkages(br, Ehdr); return(this); }