m_font = *wxNORMAL_FONT;
m_brush = *wxWHITE_BRUSH;
- m_graphicContext = NULL;
+ m_graphicContext = wxGraphicsContext::Create();
m_logicalFunctionSupported = true;
}
if (m_logicalFunctionSupported)
m_logicalFunctionSupported = m_graphicContext->SetCompositionMode(mode);
- if (mode == wxCOMPOSITION_XOR)
+ if ( function == wxXOR )
m_graphicContext->SetAntialiasMode(wxANTIALIAS_NONE);
else
m_graphicContext->SetAntialiasMode(wxANTIALIAS_DEFAULT);
wxCoord *descent, wxCoord *externalLeading ,
const wxFont *theFont ) const
{
- wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoGetTextExtent - invalid DC") );
+ wxCHECK_RET( m_graphicContext, wxT("wxGCDC(cg)::DoGetTextExtent - invalid DC") );
if ( theFont )
{
bool wxGCDCImpl::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const
{
- wxCHECK_MSG( IsOk(), false, wxT("wxGCDC(cg)::DoGetPartialTextExtents - invalid DC") );
+ wxCHECK_MSG( m_graphicContext, false, wxT("wxGCDC(cg)::DoGetPartialTextExtents - invalid DC") );
widths.Clear();
widths.Add(0,text.Length());
if ( text.IsEmpty() )