X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6670f56440ae9209b3e2e51e06acf3bc5aaf1905..4952771da3299869bfdb805edb2906ca6551637e:/src/os2/metafile.cpp diff --git a/src/os2/metafile.cpp b/src/os2/metafile.cpp index cb3d8541db..797b023742 100644 --- a/src/os2/metafile.cpp +++ b/src/os2/metafile.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: metafile.cpp +// Name: src/os2/metafile.cpp // Purpose: wxMetaFile, wxMetaFileDC etc. These classes are optional. // Author: David Webster // Modified by: @@ -12,10 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifndef WX_PRECOMP -#include "wx/setup.h" -#endif - #if wxUSE_METAFILE #ifndef WX_PRECOMP @@ -62,7 +58,7 @@ wxMetafile::wxMetafile(const wxString& file) M_METAFILEDATA->m_windowsMappingMode = wxMM_ANISOTROPIC; M_METAFILEDATA->m_metafile = 0; - if (!file.IsNull() && (file.Cmp(wxT("")) == 0)) + if (!file.empty()) M_METAFILEDATA->m_metafile = (WXHANDLE)0; // TODO: GetMetaFile(file); } @@ -97,13 +93,9 @@ bool wxMetafile::Play(wxDC *dc) if (!m_refData) return FALSE; - dc->BeginDrawing(); - // if (dc->GetHDC() && M_METAFILEDATA->m_metafile) // PlayMetaFile((HDC) dc->GetHDC(), (HMETAFILE) M_METAFILEDATA->m_metafile); - dc->EndDrawing(); - return true; } @@ -144,7 +136,7 @@ wxMetafileDC::wxMetafileDC(const wxString& file) // TODO /* - if (!file.IsNull() && (file != wxT(""))) + if (!file.empty()) m_hDC = (WXHDC) CreateMetaFile(file); else m_hDC = (WXHDC) CreateMetaFile(NULL); @@ -170,7 +162,7 @@ wxMetafileDC::wxMetafileDC( const wxString& file, m_minY = 10000; m_maxX = -10000; m_maxY = -10000; - if (file != wxT("") && wxFileExists(file)) + if (!file.empty() && wxFileExists(file)) wxRemoveFile(file); // m_hDC = (WXHDC) CreateMetaFile(file);