/////////////////////////////////////////////////////////////////////////////
-// Name: msw/metafile.cpp
+// Name: src/msw/metafile.cpp
// Purpose: wxMetafileDC etc.
// Author: Julian Smart
// Modified by: VZ 07.01.00: implemented wxMetaFileDataObject
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
- #include "wx/setup.h"
-#endif
-
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/app.h"
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.IsEmpty() && wxFileExists(file))
+ if ( !file.empty() && wxFileExists(file))
wxRemoveFile(file);
m_hDC = (WXHDC) CreateMetaFile(file);
*externalLeading = tm.tmExternalLeading;
}
+void wxMetafileDC::DoGetSize(int *width, int *height) const
+{
+ wxCHECK_RET( m_refData, _T("invalid wxMetafileDC") );
+
+ if ( width )
+ *width = M_METAFILEDATA->m_width;
+ if ( height )
+ *height = M_METAFILEDATA->m_height;
+}
+
wxMetafile *wxMetafileDC::Close()
{
SelectOldObjects(m_hDC);
#endif // wxUSE_DRAG_AND_DROP
#endif // wxUSE_METAFILE
-