public MIFRegion(MIFFileReader mr, NumberFormatInfo nfi) : base(mr.mifNLine) { cnt++; string[] strs = mr.curStr.Split(' '); if (strs.Length == 2) { parts = Int32.Parse(strs[1]); points = new MPoint[parts][]; for (int i = 0; i < parts; i++) { mr.ReadLine(true); int n = Int32.Parse(mr.curStr); points[i] = new MPoint[n]; for (int j = 0; j < n; j++) { points[i][j] = new MPoint(mr, nfi); } } mr.ReadLine(); if (mr.curStr != null && mr.curStr.StartsWith("pen", StringComparison.OrdinalIgnoreCase)) { pen = new MIFPen(mr); } if (mr.curStr != null && mr.curStr.StartsWith("brush", StringComparison.OrdinalIgnoreCase)) { brush = new MIFBrush(mr); } // if( mr.curStr != null && mr.curStr.ToLower().StartsWith( "center" ) ) // center = new MPoint( mr ); } }
public MIFEllipse(MIFFileReader mr, NumberFormatInfo nfi) : base(mr.mifNLine) { cnt++; string[] strs1 = mr.curStr.Split(' '); if (strs1.Length == 5) { point1 = new MPoint(double.Parse(strs1[1], nfi), double.Parse(strs1[2], nfi)); point2 = new MPoint(double.Parse(strs1[3], nfi), double.Parse(strs1[4], nfi)); } mr.ReadLine(); if (mr.curStr != null && mr.curStr.StartsWith("pen", StringComparison.OrdinalIgnoreCase)) { pen = new MIFPen(mr); } if (mr.curStr != null && mr.curStr.StartsWith("brush", StringComparison.OrdinalIgnoreCase)) { brush = new MIFBrush(mr); } }