public CGMRestrictedTextType(CGMRestrictedText.RTType t) { type = t; }
Command FC(Command c) { byte[] be = BinaryUtil.ExtractStream(c.Parameters); TraceLoading = string.Format("{0}\r\n{1}-{2}", TraceLoading, c.ElementID, c.ElementClass); Console.WriteLine(">> {1}-{0}", c.ElementID, c.ElementClass); c.Parameters.Seek(0, System.IO.SeekOrigin.Begin); switch (c.ElementClass) { case CGMEnumerations.CONTROL_ELEMENTS: { if (c.ElementID == (int)CGMEnumerations.ControlElement.VDC_REAL_PRECISION)//beginmf { _VDCRealPrecisionType(c); } if (c.ElementID == (int)CGMEnumerations.ControlElement.VDC_INTEGER_PRECISION)//beginmf { _VDCIntegerPrecision(c); } } break; case CGMEnumerations.ATTRIBUTE_ELEMENTS: { if (c.ElementID == CGMEnumerations.RESTRICTED_TEXT_TYPE)//beginmf { RestrictedTextType = CGMRestrictedText.MakeType(c, this); structuresFocused.Add(new CGMRestrictedTextType(RestrictedTextType)); } } break; case CGMEnumerations.DELIMITER_ELEMENTS: { if (c.ElementID == CGMEnumerations.BEGIN_METAFILE)//beginmf { CGMHeader = BinaryUtil.getString(c); byte[] strx = BinaryUtil.GetStringASCII(CGMHeader); c.ClearParameters(); c.Parameters.Write(strx, 0, strx.Length); Console.WriteLine("Begin Metafile: {0}", CGMHeader); } if (c.ElementID == CGMEnumerations.END_METAFILE) { Console.WriteLine("End Metafile."); } } break; case CGMEnumerations.PICTURE_DESCRIPTOR_ELEMENTS://2 { if (c.ElementID == CGMEnumerations.SCALING_MODE) { this.ScalingMode = new CGMScalingMode(c, this); } if (c.ElementID == CGMEnumerations.VDC_EXTENT) { this.VDCextent = new VDCExtent(c, this); } } break; case CGMEnumerations.GRAPHICAL_PRIMITIVE_ELEMENTS://4 { if (c.ElementID == CGMEnumerations.POLYBEZIER) { CGMPolyBezier pll = new CGMPolyBezier(c, this); structuresFocused.Add(pll); } if (c.ElementID == CGMEnumerations.POLYLINE) { CGMPolyLine pll = new CGMPolyLine(c, this); structuresFocused.Add(pll); } if (c.ElementID == CGMEnumerations.RESTRICTED_TEXT) { //string metf = RestictedText(c); CGMRestrictedText rst = new CGMRestrictedText(c, this); structuresFocused.Add(rst); //Console.WriteLine("RESTRICTED_TEXT: {0}", metf); } } break; case CGMEnumerations.METAFILE_DESCRIPTOR_ELEMENTS://1 { if (c.ElementID == CGMEnumerations.MAXIMUM_VDC_EXTENT) { VDCExtent vdc = new VDCExtent(c, this); } if (c.ElementID == CGMEnumerations.METAFILE_VERSION)//mfversion { CGMVersion = (int)BinaryUtil.makeUInt16(c); Console.WriteLine("Metafile Version: {0}", CGMVersion); } if (c.ElementID == CGMEnumerations.METAFILE_DESCRIPTION)//mfdesc { CGMDescription = BinaryUtil.getString(c); Console.WriteLine("Metafile Desc: {0}", CGMDescription); } if (c.ElementID == CGMEnumerations.FONT_LIST)//mfdesc { CGMFontList fl = new CGMFontList(c); structuresFocused.Add(fl); Console.WriteLine("Font List: {0}", fl.fonts); } if (c.ElementID == CGMEnumerations.INTEGER_PRECISION) { string metf = _IntPrecision(c); Console.WriteLine("INTEGER_PRECISION: {0}", metf); } if (c.ElementID == CGMEnumerations.REAL_PRECISION) { string metf = _RealPrecision(c); Console.WriteLine("REAL_PRECISION: {0}", metf); } if (c.ElementID == CGMEnumerations.VDC_TYPE) { string metf = VDCType(c); Console.WriteLine("VDCtype: {0}", metf); } if (c.ElementID == CGMEnumerations.COLOUR_PRECISION) { string metf = ColorPrecision(c); Console.WriteLine("COLOUR_PRECISION: {0}", metf); } } break; } return c; }