wxQt: Enable QPainter antialiasing by default.

This commit is contained in:
Alex Shvartzkop 2024-02-15 22:34:06 +03:00
parent 9b97d3a308
commit 7037d2ae64
3 changed files with 18 additions and 0 deletions

View file

@ -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() );

View file

@ -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);

View file

@ -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;