private static FontXRecord CreateFontXRecord(int index) { FontXRecord r = new FontXRecord(); r.FontIndex = ((short)index); return(r); }
public void TestLoad() { FontXRecord record = new FontXRecord(TestcaseRecordInputStream.Create((short)0x1026, data)); Assert.AreEqual(5, record.FontIndex); Assert.AreEqual(6, record.RecordSize); }
public AttachedLabelAggregate(RecordStream rs, ChartRecordAggregate container) : base(RuleName_ATTACHEDLABEL, container) { ChartSheetAggregate cs = GetContainer <ChartSheetAggregate>(ChartRecordAggregate.RuleName_CHARTSHEET); _isFirst = cs.AttachLabelCount == 0; cs.AttachLabelCount++; text = (TextRecord)rs.GetNext(); rs.GetNext();//BeginRecord pos = (PosRecord)rs.GetNext(); if (rs.PeekNextChartSid() == FontXRecord.sid) { fontX = (FontXRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == AlRunsRecord.sid) { alRuns = (AlRunsRecord)rs.GetNext(); } brai = (BRAIRecord)rs.GetNext(); if (rs.PeekNextChartSid() == SeriesTextRecord.sid) { seriesText = (SeriesTextRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == FrameRecord.sid) { frame = new FrameAggregate(rs, this); } if (rs.PeekNextChartSid() == ObjectLinkRecord.sid) { objectLink = (ObjectLinkRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == DataLabExtContentsRecord.sid) { dataLab = (DataLabExtContentsRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == CrtLayout12Record.sid) { crtLayout = (CrtLayout12Record)rs.GetNext(); } if (rs.PeekNextChartSid() == TextPropsStreamRecord.sid) { textProps = new TextPropsAggregate(rs, this); } if (rs.PeekNextChartSid() == CrtMlFrtRecord.sid) { crtMlFrt = new CrtMlFrtAggregate(rs, this); } Record r = rs.GetNext();//EndRecord Debug.Assert(r.GetType() == typeof(EndRecord)); }
public void TestStore() { FontXRecord record = new FontXRecord(); record.FontIndex = ((short)5); 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); } }
public AXSAggregate(RecordStream rs, ChartRecordAggregate container) : base(RuleName_AXS, container) { if (rs.PeekNextChartSid() == IFmtRecordRecord.sid) { ifmt = (IFmtRecordRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == TickRecord.sid) { tick = (TickRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == FontXRecord.sid) { fontx = (FontXRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == AxisLineRecord.sid) { while (rs.PeekNextChartSid() == AxisLineRecord.sid) { axisLines.Add((AxisLineRecord)rs.GetNext()); lineFormats.Add((LineFormatRecord)rs.GetNext()); } } if (rs.PeekNextChartSid() == AreaFormatRecord.sid) { areaFormat = (AreaFormatRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == GelFrameRecord.sid) { gelFrame = new GelFrameAggregate(rs, this); } if (rs.PeekNextChartSid() == ShapePropsStreamRecord.sid) { while (rs.PeekNextChartSid() == ShapePropsStreamRecord.sid) { shapes.Add(new ShapePropsAggregate(rs, this)); } } if (rs.PeekNextChartSid() == TextPropsStreamRecord.sid) { textProps = (TextPropsStreamRecord)rs.GetNext(); while (rs.PeekNextChartSid() == ContinueFrt12Record.sid) { continues.Add((ContinueFrt12Record)rs.GetNext()); } } }