func (mf *Metafile) Dispose() { mf.ensureFinished() if mf.hemf != 0 { win.DeleteEnhMetaFile(mf.hemf) mf.hemf = 0 } }
func (mf *Metafile) Save(filePath string) error { hemf := win.CopyEnhMetaFile(mf.hemf, syscall.StringToUTF16Ptr(filePath)) if hemf == 0 { return newError("CopyEnhMetaFile failed") } win.DeleteEnhMetaFile(hemf) return nil }