public SSAggregate(RecordStream rs, ChartRecordAggregate container) : base(RuleName_SS, container) { dataFormat = (DataFormatRecord)rs.GetNext(); rs.GetNext(); if (rs.PeekNextChartSid() == Chart3DBarShapeRecord.sid) { chart3DBarShape = (Chart3DBarShapeRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == LineFormatRecord.sid) { lineFormat = (LineFormatRecord)rs.GetNext(); areaFormat = (AreaFormatRecord)rs.GetNext(); pieFormat = (PieFormatRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == SerFmtRecord.sid) { serFmt = (SerFmtRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == GelFrameRecord.sid) { gelFrame = new GelFrameAggregate(rs, this); } if (rs.PeekNextChartSid() == MarkerFormatRecord.sid) { markerFormat = (MarkerFormatRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == AttachedLabelRecord.sid) { attachedLabel = (AttachedLabelRecord)rs.GetNext(); } if (rs.PeekNextChartSid() == ShapePropsStreamRecord.sid) { shapeProps1 = new ShapePropsAggregate(rs, this); } if (rs.PeekNextChartSid() == ShapePropsStreamRecord.sid) { shapeProps2 = new ShapePropsAggregate(rs, this); } if (rs.PeekNextChartSid() == CrtMlFrtRecord.sid) { crtMlFrt = new CrtMlFrtAggregate(rs, this); } Record r = rs.GetNext();//EndRecord Debug.Assert(r.GetType() == typeof(EndRecord)); }
private static AreaFormatRecord CreateAreaFormatRecord1() { AreaFormatRecord r = new AreaFormatRecord(); r.ForegroundColor = (16777215); // RGB Color r.BackgroundColor = (0); // RGB Color r.Pattern = ((short)1); // TODO: Add Pattern constants to record r.IsAutomatic = (true); r.IsInvert = (false); r.ForecolorIndex = ((short)78); r.BackcolorIndex = ((short)77); return(r); }
private static AreaFormatRecord CreateAreaFormatRecord2() { AreaFormatRecord r = new AreaFormatRecord(); r.ForegroundColor = (0x00c0c0c0); r.BackgroundColor = (0x00000000); r.Pattern = ((short)1); r.IsAutomatic = (false); r.IsInvert = (false); r.ForecolorIndex = ((short)22); r.BackcolorIndex = ((short)79); return(r); }
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()); } } }
public void TestLoad() { AreaFormatRecord record = new AreaFormatRecord(TestcaseRecordInputStream.Create((short)0x100a, data)); Assert.AreEqual(0xFFFFFF, record.ForegroundColor); Assert.AreEqual(0x000000, record.BackgroundColor); Assert.AreEqual(1, record.Pattern); Assert.AreEqual(1, record.FormatFlags); Assert.AreEqual(true, record.IsAutomatic); Assert.AreEqual(false, record.IsInvert); Assert.AreEqual(0x4e, record.ForecolorIndex); Assert.AreEqual(0x4d, record.BackcolorIndex); Assert.AreEqual(20, record.RecordSize); }
public void TestLoad() { AreaFormatRecord record = new AreaFormatRecord(TestcaseRecordInputStream.Create((short)0x100a, data)); Assert.AreEqual(0xFFFFFF, record.ForegroundColor); Assert.AreEqual(0x000000, record.BackgroundColor); Assert.AreEqual(1, record.Pattern); Assert.AreEqual(1, record.FormatFlags); Assert.AreEqual(true, record.IsAutomatic); Assert.AreEqual(false, record.IsInvert); Assert.AreEqual(0x4e, record.ForecolorIndex); Assert.AreEqual(0x4d, record.BackcolorIndex); Assert.AreEqual(20, record.RecordSize); }
public void TestStore() { AreaFormatRecord record = new AreaFormatRecord(); record.ForegroundColor = (0xFFFFFF); record.BackgroundColor = (0x000000); record.Pattern = ((short)1); record.IsAutomatic = (true); record.IsInvert = (false); record.ForecolorIndex = ((short)0x4e); record.BackcolorIndex = ((short)0x4d); 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 void TestStore() { AreaFormatRecord record = new AreaFormatRecord(); record.ForegroundColor = (0xFFFFFF); record.BackgroundColor = (0x000000); record.Pattern = ((short)1); record.IsAutomatic = (true); record.IsInvert = (false); record.ForecolorIndex = ((short)0x4e); record.BackcolorIndex = ((short)0x4d); 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 FrameAggregate(RecordStream rs, ChartRecordAggregate container) : base(RuleName_FRAME, container) { frame = (FrameRecord)rs.GetNext(); rs.GetNext();//BeginRecord lineFormat = (LineFormatRecord)rs.GetNext(); areaFormat = (AreaFormatRecord)rs.GetNext(); if (rs.PeekNextChartSid() == GelFrameRecord.sid) { gelFrame = new GelFrameAggregate(rs, this); } if (rs.PeekNextChartSid() == ShapePropsStreamRecord.sid) { shapeProps = new ShapePropsAggregate(rs, this); } Record r = rs.GetNext();//EndRecord Debug.Assert(r.GetType() == typeof(EndRecord)); }
private AreaFormatRecord CreateAreaFormatRecord2() { AreaFormatRecord r = new AreaFormatRecord(); r.ForegroundColor = (0x00c0c0c0); r.BackgroundColor = (0x00000000); r.Pattern = ((short)1); r.IsAutomatic = (false); r.IsInvert = (false); r.ForecolorIndex = ((short)22); r.BackcolorIndex = ((short)79); return r; }
private AreaFormatRecord CreateAreaFormatRecord1() { AreaFormatRecord r = new AreaFormatRecord(); r.ForegroundColor = (16777215); // RGB Color r.BackgroundColor = (0); // RGB Color r.Pattern = ((short)1); // TODO: Add Pattern constants to record r.IsAutomatic = (true); r.IsInvert = (false); r.ForecolorIndex = ((short)78); r.BackcolorIndex = ((short)77); return r; }
private AreaFormatRecord CreateAreaFormatRecord2() { AreaFormatRecord r = new AreaFormatRecord(); r.SetForegroundColor(0x00c0c0c0); r.SetBackgroundColor(0x00000000); r.SetPattern((short)1); r.SetAutomatic(false); r.SetInvert(false); r.SetForecolorIndex((short)22); r.SetBackcolorIndex((short)79); return r; }
private AreaFormatRecord CreateAreaFormatRecord1() { AreaFormatRecord r = new AreaFormatRecord(); r.SetForegroundColor( 16777215 ); // RGB Color r.SetBackgroundColor( 0 ); // RGB Color r.SetPattern( (short) 1 ); // TODO: Add Pattern constants to record r.SetAutomatic( true ); r.SetInvert( false ); r.SetForecolorIndex( (short) 78 ); r.SetBackcolorIndex( (short) 77 ); return r; }