if (!m_refData)
return false;
- dc->BeginDrawing();
-
if (dc->GetHDC() && M_METAFILEDATA->m_metafile)
{
if ( !::PlayMetaFile(GetHdcOf(*dc), (HMETAFILE)
}
}
- dc->EndDrawing();
-
return true;
}
m_minY = 10000;
m_maxX = -10000;
m_maxY = -10000;
- if ( !file.empty() && wxFileExists(file))
+ if ( !file.empty() && wxFileExists(file) )
wxRemoveFile(file);
- m_hDC = (WXHDC) CreateMetaFile(file);
+ m_hDC = (WXHDC) CreateMetaFile(file.empty() ? NULL : file.c_str());
m_ok = true;
}
void wxMetafileDC::GetTextExtent(const wxString& string, long *x, long *y,
- long *descent, long *externalLeading, wxFont *theFont, bool WXUNUSED(use16bit)) const
+ long *descent, long *externalLeading,
+ const wxFont *theFont,
+ bool WXUNUSED(use16bit)) const
{
- wxFont *fontToUse = theFont;
+ const wxFont *fontToUse = theFont;
if (!fontToUse)
- fontToUse = (wxFont*) &m_font;
+ fontToUse = &m_font;
HDC dc = GetDC(NULL);