public void TestLoad() { LegendRecord record = new LegendRecord(TestcaseRecordInputStream.Create((short)0x1015, data)); Assert.AreEqual((int)0xe76, record.XAxisUpperLeft); Assert.AreEqual((int)0x786, record.YAxisUpperLeft); Assert.AreEqual((int)0x119, record.XSize); Assert.AreEqual((int)0x8b, record.YSize); Assert.AreEqual((byte)0x3, record.Type); Assert.AreEqual((byte)0x1, record.Spacing); Assert.AreEqual((short)0x1f, record.Options); Assert.AreEqual(true, record.IsAutoPosition); Assert.AreEqual(true, record.IsAutoSeries); Assert.AreEqual(true, record.IsAutoXPositioning); Assert.AreEqual(true, record.IsAutoYPositioning); Assert.AreEqual(true, record.IsVertical); Assert.AreEqual(false, record.IsDataTable); Assert.AreEqual(24, record.RecordSize); }
public void TestStore() { LegendRecord record = new LegendRecord(); record.XAxisUpperLeft = ((int)0xe76); record.YAxisUpperLeft = ((int)0x786); record.XSize = ((int)0x119); record.YSize = ((int)0x8b); record.Type = ((byte)0x3); record.Spacing = ((byte)0x1); record.Options = ((short)0x1f); record.IsAutoPosition = (true); record.IsAutoSeries = (true); record.IsAutoXPositioning = (true); record.IsAutoYPositioning = (true); record.IsVertical = (true); record.IsDataTable = (false); 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 LDAggregate(RecordStream rs, ChartRecordAggregate container) : base(RuleName_LD, container) { legend = (LegendRecord)rs.GetNext(); rs.GetNext();//BeginRecord pos = (PosRecord)rs.GetNext(); attachedLabel = new AttachedLabelAggregate(rs, this); if (rs.PeekNextChartSid() == FrameRecord.sid) { frame = new FrameAggregate(rs, this); } 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() { LegendRecord record = new LegendRecord(); record.XAxisUpperLeft=((int)0xe76); record.YAxisUpperLeft=((int)0x786); record.XSize = ((int)0x119); record.YSize = ((int)0x8b); record.Type = ((byte)0x3); record.Spacing = ((byte)0x1); record.Options = ((short)0x1f); record.IsAutoPosition = (true); record.IsAutoSeries = (true); record.IsAutoXPositioning = (true); record.IsAutoYPositioning = (true); record.IsVertical = (true); record.IsDataTable = (false); 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); }
private static LegendRecord CreateLegendRecord() { LegendRecord r = new LegendRecord(); r.XAxisUpperLeft = (3542); r.YAxisUpperLeft = (1566); r.XSize = (437); r.YSize = (213); r.Type = (LegendRecord.TYPE_RIGHT); r.Spacing = (LegendRecord.SPACING_MEDIUM); r.IsAutoPosition = (true); r.IsAutoSeries = (true); r.IsAutoXPositioning = (true); r.IsAutoYPositioning = (true); r.IsVertical = (true); r.IsDataTable = (false); return(r); }
private LegendRecord CreateLegendRecord() { LegendRecord r = new LegendRecord(); r.XAxisUpperLeft = (3542); r.YAxisUpperLeft = (1566); r.XSize = (437); r.YSize = (213); r.Type = (LegendRecord.TYPE_RIGHT); r.Spacing = (LegendRecord.SPACING_MEDIUM); r.IsAutoPosition = (true); r.IsAutoSeries = (true); r.IsAutoXPositioning = (true); r.IsAutoYPositioning = (true); r.IsVertical = (true); r.IsDataTable = (false); return r; }
private LegendRecord CreateLegendRecord() { LegendRecord r = new LegendRecord(); r.SetXAxisUpperLeft(3542); r.SetYAxisUpperLeft(1566); r.SetXSize(437); r.SetYSize(213); r.SetType(LegendRecord.TYPE_RIGHT); r.SetSpacing(LegendRecord.SPACING_MEDIUM); r.SetAutoPosition(true); r.SetAutoSeries(true); r.SetAutoXPositioning(true); r.SetAutoYPositioning(true); r.SetVertical(true); r.SetDataTable(false); return r; }