void wxCairoContext::DrawText( const wxString &str, wxDouble x, wxDouble y )
{
- if ( m_font.IsNull() || str.empty())
+ wxCHECK_RET( !m_font.IsNull(), wxT("wxCairoContext::DrawText - no valid font set") );
+
+ if ( str.empty())
return;
#ifdef __WXGTK__
void wxCairoContext::GetTextExtent( const wxString &str, wxDouble *width, wxDouble *height,
wxDouble *descent, wxDouble *externalLeading ) const
{
+ wxCHECK_RET( !m_font.IsNull(), wxT("wxCairoContext::GetTextExtent - no valid font set") );
+
if ( width )
*width = 0;
if ( height )
if ( externalLeading )
*externalLeading = 0;
- if ( m_font.IsNull() || str.empty())
+ if ( str.empty())
return;
#ifdef __WXGTK__
widths.Empty();
widths.Add(0, text.length());
+ wxCHECK_RET( !m_font.IsNull(), wxT("wxCairoContext::GetPartialTextExtents - no valid font set") );
+
if (text.empty())
return;
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;
void wxMacCoreGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDouble y )
{
- if ( m_font.IsNull() )
- return;
+ wxCHECK_RET( !m_font.IsNull(), wxT("wxMacCoreGraphicsContext::DrawText - no valid font set") );
EnsureIsValid();
#if wxOSX_USE_CORE_TEXT
void wxMacCoreGraphicsContext::DrawText( const wxString &str, wxDouble x, wxDouble y, wxDouble angle )
{
- if ( m_font.IsNull() )
- return;
+ wxCHECK_RET( !m_font.IsNull(), wxT("wxMacCoreGraphicsContext::DrawText - no valid font set") );
EnsureIsValid();
#if wxOSX_USE_CORE_TEXT
void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *width, wxDouble *height,
wxDouble *descent, wxDouble *externalLeading ) const
{
- wxCHECK_RET( !m_font.IsNull(), wxT("wxDC(cg)::DoGetTextExtent - no valid font set") );
+ wxCHECK_RET( !m_font.IsNull(), wxT("wxMacCoreGraphicsContext::GetTextExtent - no valid font set") );
if ( width )
*width = 0;
widths.Empty();
widths.Add(0, text.length());
+ wxCHECK_RET( !m_font.IsNull(), wxT("wxMacCoreGraphicsContext::DrawText - no valid font set") );
+
if (text.empty())
return;