#include "wx/msw/wrapcdlg.h"
#include "wx/image.h"
#include "wx/window.h"
- #include "wx/dc.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/app.h"
#include "wx/bitmap.h"
- #include "wx/dcmemory.h"
#include "wx/log.h"
#include "wx/icon.h"
- #include "wx/dcprint.h"
#include "wx/module.h"
+ // include all dc types that are used as a param
+ #include "wx/dc.h"
+ #include "wx/dcclient.h"
+ #include "wx/dcmemory.h"
+ #include "wx/dcprint.h"
#endif
#include "wx/private/graphics.h"
{
Rect drawRect((REAL) x, (REAL)y, (REAL)w, (REAL)h);
m_context->SetPixelOffsetMode( PixelOffsetModeNone );
- m_context->SetInterpolationMode(InterpolationModeHighQualityBicubic);
m_context->DrawImage(image, drawRect, 0 , 0 , image->GetWidth()-1, image->GetHeight()-1, UnitPixel ) ;
m_context->SetPixelOffsetMode( PixelOffsetModeHalf );
}
void wxGDIPlusContext::DrawText( const wxString &str, wxDouble x, wxDouble y )
{
- if ( m_font.IsNull() || str.IsEmpty())
+ wxCHECK_RET( !m_font.IsNull(), wxT("wxGDIPlusContext::DrawText - no valid font set") );
+
+ if ( str.IsEmpty())
return ;
wxWCharBuffer s = str.wc_str( *wxConvUI );
void wxGDIPlusContext::GetTextExtent( const wxString &str, wxDouble *width, wxDouble *height,
wxDouble *descent, wxDouble *externalLeading ) const
{
+ wxCHECK_RET( !m_font.IsNull(), wxT("wxGDIPlusContext::GetTextExtent - no valid font set") );
+
wxWCharBuffer s = str.wc_str( *wxConvUI );
FontFamily ffamily ;
Font* f = ((wxGDIPlusFontData*)m_font.GetRefData())->GetGDIPlusFont();
widths.Empty();
widths.Add(0, text.length());
+ wxCHECK_RET( !m_font.IsNull(), wxT("wxGDIPlusContext::GetPartialTextExtents - no valid font set") );
+
if (text.empty())
return;