Ignore:
Timestamp:
Mar 19, 2021, 9:15:03 AM (3 years ago)
Author:
stoecker
Message:

update to qwt verion 6.1.1 to fix build with newer Qt5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/qwt/qwt_widget_overlay.cpp

    r8127 r9383  
    1212#include <qpainter.h>
    1313#include <qpaintengine.h>
     14#include <qpainterpath.h>
    1415#include <qimage.h>
    1516#include <qevent.h>
     
    2324}
    2425
    25 static QRegion qwtAlphaMask( 
    26     const QImage& image, const QVector<QRect> rects )
     26static QRegion qwtAlphaMask(
     27    const QImage& image, const QVector<QRect> &rects )
    2728{
    2829    const int w = image.width();
     
    4243        y2 = qMin( y2, h - 1 );
    4344
    44         for ( int y = y1; y <= y2; ++y ) 
     45        for ( int y = y1; y <= y2; ++y )
    4546        {
    4647            bool inRect = false;
    4748            int rx0 = -1;
    4849
    49             const uint *line = 
     50            const uint *line =
    5051                reinterpret_cast<const uint *> ( image.scanLine( y ) ) + x1;
    51             for ( int x = x1; x <= x2; x++ ) 
     52            for ( int x = x1; x <= x2; x++ )
    5253            {
    5354                const bool on = ( ( *line++ >> 24 ) != 0 );
    54                 if ( on != inRect ) 
     55                if ( on != inRect )
    5556                {
    56                     if ( inRect  ) 
     57                    if ( inRect  )
    5758                    {
    5859                        rect.setCoords( rx0, y, x - 1, y );
    5960                        region += rect;
    60                     } 
    61                     else 
     61                    }
     62                    else
    6263                    {
    6364                        rx0 = x;
     
    6566
    6667                    inRect = on;
    67                 } 
     68                }
    6869            }
    6970
    70             if ( inRect ) 
     71            if ( inRect )
    7172            {
    7273                rect.setCoords( rx0, y, x2, y );
     
    212213        d_data->rgbaBuffer = ( uchar* )::calloc( width() * height(), 4 );
    213214
    214         QImage image( d_data->rgbaBuffer, 
     215        QImage image( d_data->rgbaBuffer,
    215216            width(), height(), qwtMaskImageFormat() );
    216217
     
    249250void QwtWidgetOverlay::paintEvent( QPaintEvent* event )
    250251{
    251     const QRegion clipRegion = event->region();
     252    const QRegion &clipRegion = event->region();
    252253
    253254    QPainter painter( this );
     
    266267    if ( d_data->rgbaBuffer && useRgbaBuffer )
    267268    {
    268         const QImage image( d_data->rgbaBuffer, 
     269        const QImage image( d_data->rgbaBuffer,
    269270            width(), height(), qwtMaskImageFormat() );
    270271
Note: See TracChangeset for help on using the changeset viewer.