public void Close() // release resources and close metafile { if (CurrentFont != null) { CurrentFont.Dispose(); } MetaFileMx.Close(); }
public static GraphicsMx OpenMetafile( string metaFileName, ResultsFormat rf) { GraphicsMx g = new GraphicsMx(); g.MetaFileName = metaFileName; g.G = MetaFileMx.Open(metaFileName, rf.PageBounds); if (g.G == null) { return(null); } g.PageWidth = rf.PageWidth; g.PageHeight = rf.PageHeight; g.PageMargins = rf.PageMargins.Clone(); g.SetFont(rf.FontName, rf.FontSize); return(g); }