1. Override DoGetTextExtent() in wxMetafileDC instead of redefining (unused)

GetTextExtent()
2. Do use the provided font in it


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-05-18 15:14:44 +00:00
parent 0fb56f7115
commit ce631c0b13
3 changed files with 45 additions and 9 deletions

View File

@@ -88,6 +88,18 @@ public:
// Should be called at end of drawing
virtual wxMetafile *Close();
virtual void SetMapMode(int mode);
#if wxABI_VERSION >= 20805
virtual void DoGetTextExtent(const wxString& string,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
const wxFont *theFont = NULL) const;
#endif // wx ABI 2.8.5+
// this method shouldn't have been defined here (DoGetTextExtent() is the
// correct one) but keep it to avoid breaking binary backwards
// compatibility
virtual void GetTextExtent(const wxString& string, long *x, long *y,
long *descent = NULL, long *externalLeading = NULL,
wxFont *theFont = NULL, bool use16bit = false) const;