bool wxQtDCImpl::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, wxRasterOperationMode rop, bool useMask, wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask) ) { wxQtDCImpl *implSource = (wxQtDCImpl*)source->GetImpl(); QImage *qtSource = implSource->m_qtImage; // Not a CHECK on purpose if ( !qtSource ) return false; QImage qtSourceConverted = *qtSource; if ( !useMask ) qtSourceConverted = qtSourceConverted.convertToFormat( QImage::Format_RGB32 ); // Change logical function wxRasterOperationMode savedMode = GetLogicalFunction(); SetLogicalFunction( rop ); m_qtPainter->drawImage( QRect( xdest, ydest, width, height ), qtSourceConverted, QRect( xsrc, ysrc, width, height ) ); SetLogicalFunction( savedMode ); return true; }
void wxMemoryDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { // Set this to 1 to work around an apparent video driver bug // (visible with e.g. 70x70 rectangle on a memory DC; see Drawing sample) #if wxUSE_MEMORY_DC_DRAW_RECTANGLE if (m_brush.Ok() && m_pen.Ok() && (m_brush.GetStyle() == wxSOLID || m_brush.GetStyle() == wxTRANSPARENT) && (m_pen.GetStyle() == wxSOLID || m_pen.GetStyle() == wxTRANSPARENT) && (GetLogicalFunction() == wxCOPY)) { wxDrawRectangle(* this, x, y, width, height); } else #endif // wxUSE_MEMORY_DC_DRAW_RECTANGLE { wxMSWDCImpl::DoDrawRectangle(x, y, width, height); } }