wxQt: Enable QPainter antialiasing by default.
This commit is contained in:
parent
9b97d3a308
commit
7037d2ae64
3 changed files with 18 additions and 0 deletions
|
|
@ -83,6 +83,12 @@ void wxQtDCImpl::QtPreparePainter( )
|
|||
m_qtPainter->setBrush( wxBrush().GetHandle() );
|
||||
m_qtPainter->setFont( wxFont().GetHandle() );
|
||||
|
||||
if (m_qtPainter->device()->depth() > 1)
|
||||
{
|
||||
m_qtPainter->setRenderHints(QPainter::Antialiasing,
|
||||
true);
|
||||
}
|
||||
|
||||
if (m_clipping)
|
||||
{
|
||||
m_qtPainter->setClipRegion( m_clippingRegion.GetHandle() );
|
||||
|
|
|
|||
|
|
@ -65,6 +65,12 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
|
|||
// start drawing on the intermediary device:
|
||||
m_ok = m_qtPainter->begin( m_qtPixmap );
|
||||
|
||||
if (m_qtPainter->device()->depth() > 1)
|
||||
{
|
||||
m_qtPainter->setRenderHints(QPainter::Antialiasing,
|
||||
true);
|
||||
}
|
||||
|
||||
SetPen(m_pen);
|
||||
SetBrush(m_brush);
|
||||
SetFont(m_font);
|
||||
|
|
|
|||
|
|
@ -1361,6 +1361,12 @@ bool wxWindowQt::QtHandlePaintEvent ( QWidget *handler, QPaintEvent *event )
|
|||
// itself otherwise.
|
||||
const bool ok = m_qtPainter->begin( widget );
|
||||
|
||||
if (m_qtPainter->device()->depth() > 1)
|
||||
{
|
||||
m_qtPainter->setRenderHints(QPainter::Antialiasing,
|
||||
true);
|
||||
}
|
||||
|
||||
if ( ok )
|
||||
{
|
||||
bool handled;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue