Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_clipper.cpp


Ignore:
Timestamp:
Nov 3, 2026, 10:53:35 AM (3 weeks ago)
Author:
stuerze
Message:

deprecated functions exchanged libs updated

File:
1 edited

Legend:

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

    r9383 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    1010#include "qwt_clipper.h"
    1111#include "qwt_point_polar.h"
     12#include "qwt_interval.h"
     13#include "qwt_math.h"
     14
     15#include <qpolygon.h>
    1216#include <qrect.h>
    13 #include <string.h>
    14 #include <stdlib.h>
    15 
    16 #if QT_VERSION < 0x040601
    17 #define qAtan(x) ::atan(x)
    18 #endif
     17
     18#include <algorithm>
    1919
    2020namespace QwtClip
    2121{
    2222    // some templates used for inlining
    23     template <class Point, typename T> class LeftEdge;
    24     template <class Point, typename T> class RightEdge;
    25     template <class Point, typename T> class TopEdge;
    26     template <class Point, typename T> class BottomEdge;
    27 
    28     template <class Point> class PointBuffer;
    29 }
    30 
    31 template <class Point, typename Value>
     23    template< class Point, typename T > class LeftEdge;
     24    template< class Point, typename T > class RightEdge;
     25    template< class Point, typename T > class TopEdge;
     26    template< class Point, typename T > class BottomEdge;
     27}
     28
     29template< class Point, typename Value >
    3230class QwtClip::LeftEdge
    3331{
    34 public:
     32  public:
    3533    inline LeftEdge( Value x1, Value, Value, Value ):
    36         d_x1( x1 )
    37     {
    38     }
    39 
    40     inline bool isInside( const Point &p  ) const
    41     {
    42         return p.x() >= d_x1;
    43     }
    44 
    45     inline Point intersection( const Point &p1, const Point &p2 ) const
     34        m_x1( x1 )
     35    {
     36    }
     37
     38    inline bool isInside( const Point& p  ) const
     39    {
     40        return p.x() >= m_x1;
     41    }
     42
     43    inline Point intersection( const Point& p1, const Point& p2 ) const
    4644    {
    4745        double dy = ( p1.y() - p2.y() ) / double( p1.x() - p2.x() );
    48         return Point( d_x1, static_cast< Value >( p2.y() + ( d_x1 - p2.x() ) * dy ) );
    49     }
    50 private:
    51     const Value d_x1;
    52 };
    53 
    54 template <class Point, typename Value>
     46        return Point( m_x1, static_cast< Value >( p2.y() + ( m_x1 - p2.x() ) * dy ) );
     47    }
     48  private:
     49    const Value m_x1;
     50};
     51
     52template< class Point, typename Value >
    5553class QwtClip::RightEdge
    5654{
    57 public:
     55  public:
    5856    inline RightEdge( Value, Value x2, Value, Value ):
    59         d_x2( x2 )
    60     {
    61     }
    62 
    63     inline bool isInside( const Point &p  ) const
    64     {
    65         return p.x() <= d_x2;
    66     }
    67 
    68     inline Point intersection( const Point &p1, const Point &p2 ) const
     57        m_x2( x2 )
     58    {
     59    }
     60
     61    inline bool isInside( const Point& p  ) const
     62    {
     63        return p.x() <= m_x2;
     64    }
     65
     66    inline Point intersection( const Point& p1, const Point& p2 ) const
    6967    {
    7068        double dy = ( p1.y() - p2.y() ) / double( p1.x() - p2.x() );
    71         return Point( d_x2, static_cast<Value>( p2.y() + ( d_x2 - p2.x() ) * dy ) );
    72     }
    73 
    74 private:
    75     const Value d_x2;
    76 };
    77 
    78 template <class Point, typename Value>
     69        return Point( m_x2, static_cast< Value >( p2.y() + ( m_x2 - p2.x() ) * dy ) );
     70    }
     71
     72  private:
     73    const Value m_x2;
     74};
     75
     76template< class Point, typename Value >
    7977class QwtClip::TopEdge
    8078{
    81 public:
     79  public:
    8280    inline TopEdge( Value, Value, Value y1, Value ):
    83         d_y1( y1 )
    84     {
    85     }
    86 
    87     inline bool isInside( const Point &p  ) const
    88     {
    89         return p.y() >= d_y1;
    90     }
    91 
    92     inline Point intersection( const Point &p1, const Point &p2 ) const
     81        m_y1( y1 )
     82    {
     83    }
     84
     85    inline bool isInside( const Point& p  ) const
     86    {
     87        return p.y() >= m_y1;
     88    }
     89
     90    inline Point intersection( const Point& p1, const Point& p2 ) const
    9391    {
    9492        double dx = ( p1.x() - p2.x() ) / double( p1.y() - p2.y() );
    95         return Point( static_cast<Value>( p2.x() + ( d_y1 - p2.y() ) * dx ), d_y1 );
    96     }
    97 
    98 private:
    99     const Value d_y1;
    100 };
    101 
    102 template <class Point, typename Value>
     93        return Point( static_cast< Value >( p2.x() + ( m_y1 - p2.y() ) * dx ), m_y1 );
     94    }
     95
     96  private:
     97    const Value m_y1;
     98};
     99
     100template< class Point, typename Value >
    103101class QwtClip::BottomEdge
    104102{
    105 public:
     103  public:
    106104    inline BottomEdge( Value, Value, Value, Value y2 ):
    107         d_y2( y2 )
    108     {
    109     }
    110 
    111     inline bool isInside( const Point &p ) const
    112     {
    113         return p.y() <= d_y2;
    114     }
    115 
    116     inline Point intersection( const Point &p1, const Point &p2 ) const
     105        m_y2( y2 )
     106    {
     107    }
     108
     109    inline bool isInside( const Point& p ) const
     110    {
     111        return p.y() <= m_y2;
     112    }
     113
     114    inline Point intersection( const Point& p1, const Point& p2 ) const
    117115    {
    118116        double dx = ( p1.x() - p2.x() ) / double( p1.y() - p2.y() );
    119         return Point( static_cast<Value>( p2.x() + ( d_y2 - p2.y() ) * dx ), d_y2 );
    120     }
    121 
    122 private:
    123     const Value d_y2;
    124 };
    125 
    126 template<class Point>
    127 class QwtClip::PointBuffer
    128 {
    129 public:
    130     PointBuffer( int capacity = 0 ):
    131         m_capacity( 0 ),
    132         m_size( 0 ),
    133         m_buffer( NULL )
    134     {
    135         if ( capacity > 0 )
    136             reserve( capacity );
    137     }
    138 
    139     ~PointBuffer()
    140     {
    141         if ( m_buffer )
    142             ::free( m_buffer );
    143     }
    144 
    145     inline void setPoints( int numPoints, const Point *points )
    146     {
    147         reserve( numPoints );
    148 
    149         m_size = numPoints;
    150         ::memcpy( m_buffer, points, m_size * sizeof( Point ) );
    151     }
    152 
    153     inline void reset()
    154     {
    155         m_size = 0;
    156     }
    157 
    158     inline int size() const
    159     {
    160         return m_size;
    161     }
    162 
    163     inline Point *data() const
    164     {
    165         return m_buffer;
    166     }
    167 
    168     inline Point &operator[]( int i )
    169     {
    170         return m_buffer[i];
    171     }
    172 
    173     inline const Point &operator[]( int i ) const
    174     {
    175         return m_buffer[i];
    176     }
    177 
    178     inline void add( const Point &point )
    179     {
    180         if ( m_capacity <= m_size )
    181             reserve( m_size + 1 );
    182 
    183         m_buffer[m_size++] = point;
    184     }
    185 
    186 private:
    187     inline void reserve( int size )
    188     {
    189         if ( m_capacity == 0 )
    190             m_capacity = 1;
    191 
    192         while ( m_capacity < size )
    193             m_capacity *= 2;
    194 
    195         m_buffer = static_cast<Point *>(
    196             ::realloc( m_buffer, m_capacity * sizeof( Point ) ) );
    197     }
    198 
    199     int m_capacity;
    200     int m_size;
    201     Point *m_buffer;
     117        return Point( static_cast< Value >( p2.x() + ( m_y2 - p2.y() ) * dx ), m_y2 );
     118    }
     119
     120  private:
     121    const Value m_y2;
    202122};
    203123
    204124using namespace QwtClip;
    205125
    206 template <class Polygon, class Rect, class Point, typename T>
     126template< class Polygon, class Rect, typename T >
    207127class QwtPolygonClipper
    208128{
    209 public:
    210     QwtPolygonClipper( const Rect &clipRect ):
    211         d_clipRect( clipRect )
    212     {
    213     }
    214 
    215     Polygon clipPolygon( const Polygon &polygon, bool closePolygon ) const
     129    typedef typename Polygon::value_type Point;
     130  public:
     131    explicit QwtPolygonClipper( const Rect& clipRect ):
     132        m_clipRect( clipRect )
     133    {
     134    }
     135
     136    void clipPolygon( Polygon& points1, bool closePolygon ) const
    216137    {
    217138#if 0
    218         if ( d_clipRect.contains( polygon.boundingRect() ) )
     139        if ( m_clipRect.contains( points1.boundingRect() ) )
    219140            return polygon;
    220141#endif
    221142
    222         PointBuffer<Point> points1;
    223         PointBuffer<Point> points2( qMin( 256, polygon.size() ) );
    224 
    225         points1.setPoints( polygon.size(), polygon.data() );
    226 
    227         clipEdge< LeftEdge<Point, T> >( closePolygon, points1, points2 );
    228         clipEdge< RightEdge<Point, T> >( closePolygon, points2, points1 );
    229         clipEdge< TopEdge<Point, T> >( closePolygon, points1, points2 );
    230         clipEdge< BottomEdge<Point, T> >( closePolygon, points2, points1 );
    231 
    232         Polygon p;
    233         p.resize( points1.size() );
    234         ::memcpy( p.data(), points1.data(), points1.size() * sizeof( Point ) );
    235 
    236         return p;
    237     }
    238 
    239 private:
    240     template <class Edge>
     143        Polygon points2;
     144        points2.reserve( qMin( 256, points1.size() ) );
     145
     146        clipEdge< LeftEdge< Point, T > >( closePolygon, points1, points2 );
     147        clipEdge< RightEdge< Point, T > >( closePolygon, points2, points1 );
     148        clipEdge< TopEdge< Point, T > >( closePolygon, points1, points2 );
     149        clipEdge< BottomEdge< Point, T > >( closePolygon, points2, points1 );
     150    }
     151
     152  private:
     153    template< class Edge >
    241154    inline void clipEdge( bool closePolygon,
    242         PointBuffer<Point> &points, PointBuffer<Point> &clippedPoints ) const
    243     {
    244         clippedPoints.reset();
     155        const Polygon& points, Polygon& clippedPoints ) const
     156    {
     157        clippedPoints.clear();
    245158
    246159        if ( points.size() < 2 )
    247160        {
    248161            if ( points.size() == 1 )
    249                 clippedPoints.add( points[0] );
     162                clippedPoints += points[0];
     163
    250164            return;
    251165        }
    252166
    253         const Edge edge( d_clipRect.x(), d_clipRect.x() + d_clipRect.width(),
    254             d_clipRect.y(), d_clipRect.y() + d_clipRect.height() );
    255 
    256         int lastPos, start;
    257         if ( closePolygon )
    258         {
    259             start = 0;
    260             lastPos = points.size() - 1;
     167        const Edge edge( m_clipRect.x(), m_clipRect.x() + m_clipRect.width(),
     168            m_clipRect.y(), m_clipRect.y() + m_clipRect.height() );
     169
     170        if ( !closePolygon )
     171        {
     172            const Point& p1 = points.first();
     173
     174            if ( edge.isInside( p1 ) )
     175                clippedPoints += p1;
    261176        }
    262177        else
    263178        {
    264             start = 1;
    265             lastPos = 0;
    266 
    267             if ( edge.isInside( points[0] ) )
    268                 clippedPoints.add( points[0] );
    269         }
    270 
    271         const uint nPoints = points.size();
    272         for ( uint i = start; i < nPoints; i++ )
    273         {
    274             const Point &p1 = points[i];
    275             const Point &p2 = points[lastPos];
     179            const Point& p1 = points.first();
     180            const Point& p2 = points.last();
    276181
    277182            if ( edge.isInside( p1 ) )
    278183            {
    279                 if ( edge.isInside( p2 ) )
    280                 {
    281                     clippedPoints.add( p1 );
    282                 }
    283                 else
    284                 {
    285                     clippedPoints.add( edge.intersection( p1, p2 ) );
    286                     clippedPoints.add( p1 );
    287                 }
     184                if ( !edge.isInside( p2 ) )
     185                    clippedPoints += edge.intersection( p1, p2 );
     186
     187                clippedPoints += p1;
    288188            }
    289             else
     189            else if ( edge.isInside( p2 ) )
    290190            {
    291                 if ( edge.isInside( p2 ) )
    292                 {
    293                     clippedPoints.add( edge.intersection( p1, p2 ) );
    294                 }
     191                clippedPoints += edge.intersection( p1, p2 );
    295192            }
    296             lastPos = i;
    297         }
    298     }
    299 
    300     const Rect d_clipRect;
     193        }
     194
     195        const uint nPoints = points.size();
     196        const Point* p = points.constData();
     197
     198        for ( uint i = 1; i < nPoints; i++ )
     199        {
     200            const Point& p1 = p[i];
     201            const Point& p2 = p[i - 1];
     202
     203            if ( edge.isInside( p1 ) )
     204            {
     205                if ( !edge.isInside( p2 ) )
     206                    clippedPoints += edge.intersection( p1, p2 );
     207
     208                clippedPoints += p1;
     209            }
     210            else if ( edge.isInside( p2 ) )
     211            {
     212                clippedPoints += edge.intersection( p1, p2 );
     213            }
     214        }
     215    }
     216
     217    const Rect m_clipRect;
    301218};
    302219
    303220class QwtCircleClipper
    304221{
    305 public:
    306     QwtCircleClipper( const QRectF &r );
    307     QVector<QwtInterval> clipCircle( const QPointF &, double radius ) const;
    308 
    309 private:
     222  public:
     223    explicit QwtCircleClipper( const QRectF& r );
     224    QVector< QwtInterval > clipCircle( const QPointF&, double radius ) const;
     225
     226  private:
    310227    enum Edge
    311228    {
    … …  
    318235    };
    319236
    320     QList<QPointF> cuttingPoints(
    321         Edge, const QPointF &pos, double radius ) const;
    322 
    323     double toAngle( const QPointF &, const QPointF & ) const;
    324 
    325     const QRectF d_rect;
    326 };
    327 
    328 
    329 QwtCircleClipper::QwtCircleClipper( const QRectF &r ):
    330     d_rect( r )
    331 {
    332 }
    333 
    334 QVector<QwtInterval> QwtCircleClipper::clipCircle(
    335     const QPointF &pos, double radius ) const
    336 {
    337     QList<QPointF> points;
     237    QVector< QPointF > cuttingPoints(
     238        Edge, const QPointF& pos, double radius ) const;
     239
     240    double toAngle( const QPointF&, const QPointF& ) const;
     241
     242    const QRectF m_rect;
     243};
     244
     245
     246QwtCircleClipper::QwtCircleClipper( const QRectF& r )
     247    : m_rect( r )
     248{
     249}
     250
     251QVector< QwtInterval > QwtCircleClipper::clipCircle(
     252    const QPointF& pos, double radius ) const
     253{
     254    // using QVarLengthArray TODO ...
     255
     256    QVector< QPointF > points;
    338257    for ( int edge = 0; edge < NEdges; edge++ )
    339         points += cuttingPoints( static_cast<Edge>(edge), pos, radius );
    340 
    341     QVector<QwtInterval> intv;
     258        points += cuttingPoints( static_cast< Edge >( edge ), pos, radius );
     259
     260    QVector< QwtInterval > intv;
    342261    if ( points.size() <= 0 )
    343262    {
    344263        QRectF cRect( 0, 0, 2 * radius, 2 * radius );
    345264        cRect.moveCenter( pos );
    346         if ( d_rect.contains( cRect ) )
     265        if ( m_rect.contains( cRect ) )
    347266            intv += QwtInterval( 0.0, 2 * M_PI );
    348267    }
    349268    else
    350269    {
    351         QList<double> angles;
     270        QVector< double > angles;
     271        angles.reserve( points.size() );
     272
    352273        for ( int i = 0; i < points.size(); i++ )
    353274            angles += toAngle( pos, points[i] );
    354         qSort( angles );
    355 
    356         const int in = d_rect.contains( qwtPolar2Pos( pos, radius,
     275
     276        std::sort( angles.begin(), angles.end() );
     277
     278        const int in = m_rect.contains( qwtPolar2Pos( pos, radius,
    357279            angles[0] + ( angles[1] - angles[0] ) / 2 ) );
    358280
     281        intv.reserve( angles.size() / 2 );
    359282        if ( in )
    360283        {
    361284            for ( int i = 0; i < angles.size() - 1; i += 2 )
    362                 intv += QwtInterval( angles[i], angles[i+1] );
     285                intv += QwtInterval( angles[i], angles[i + 1] );
    363286        }
    364287        else
    365288        {
    366289            for ( int i = 1; i < angles.size() - 1; i += 2 )
    367                 intv += QwtInterval( angles[i], angles[i+1] );
     290                intv += QwtInterval( angles[i], angles[i + 1] );
     291
    368292            intv += QwtInterval( angles.last(), angles.first() );
    369293        }
    … …  
    374298
    375299double QwtCircleClipper::toAngle(
    376     const QPointF &from, const QPointF &to ) const
     300    const QPointF& from, const QPointF& to ) const
    377301{
    378302    if ( from.x() == to.x() )
    … …  
    381305    const double m = qAbs( ( to.y() - from.y() ) / ( to.x() - from.x() ) );
    382306
    383     double angle = qAtan( m );
     307    double angle = std::atan( m );
    384308    if ( to.x() > from.x() )
    385309    {
    … …  
    398322}
    399323
    400 QList<QPointF> QwtCircleClipper::cuttingPoints(
    401     Edge edge, const QPointF &pos, double radius ) const
    402 {
    403     QList<QPointF> points;
     324QVector< QPointF > QwtCircleClipper::cuttingPoints(
     325    Edge edge, const QPointF& pos, double radius ) const
     326{
     327    QVector< QPointF > points;
    404328
    405329    if ( edge == Left || edge == Right )
    406330    {
    407         const double x = ( edge == Left ) ? d_rect.left() : d_rect.right();
     331        const double x = ( edge == Left ) ? m_rect.left() : m_rect.right();
    408332        if ( qAbs( pos.x() - x ) < radius )
    409333        {
    410             const double off = qSqrt( qwtSqr( radius ) - qwtSqr( pos.x() - x ) );
     334            const double off = std::sqrt( qwtSqr( radius ) - qwtSqr( pos.x() - x ) );
    411335            const double m_y1 = pos.y() + off;
    412             if ( m_y1 >= d_rect.top() && m_y1 <= d_rect.bottom() )
     336            if ( m_y1 >= m_rect.top() && m_y1 <= m_rect.bottom() )
    413337                points += QPointF( x, m_y1 );
    414338
    415339            const double m_y2 = pos.y() - off;
    416             if ( m_y2 >= d_rect.top() && m_y2 <= d_rect.bottom() )
     340            if ( m_y2 >= m_rect.top() && m_y2 <= m_rect.bottom() )
    417341                points += QPointF( x, m_y2 );
    418342        }
    … …  
    420344    else
    421345    {
    422         const double y = ( edge == Top ) ? d_rect.top() : d_rect.bottom();
     346        const double y = ( edge == Top ) ? m_rect.top() : m_rect.bottom();
    423347        if ( qAbs( pos.y() - y ) < radius )
    424348        {
    425             const double off = qSqrt( qwtSqr( radius ) - qwtSqr( pos.y() - y ) );
     349            const double off = std::sqrt( qwtSqr( radius ) - qwtSqr( pos.y() - y ) );
    426350            const double x1 = pos.x() + off;
    427             if ( x1 >= d_rect.left() && x1 <= d_rect.right() )
     351            if ( x1 >= m_rect.left() && x1 <= m_rect.right() )
    428352                points += QPointF( x1, y );
    429353
    430354            const double m_x2 = pos.x() - off;
    431             if ( m_x2 >= d_rect.left() && m_x2 <= d_rect.right() )
     355            if ( m_x2 >= m_rect.left() && m_x2 <= m_rect.right() )
    432356                points += QPointF( m_x2, y );
    433357        }
    … …  
    440364
    441365   \param clipRect Clip rectangle
    442    \param polygon Polygon
    443    \param closePolygon True, when the polygon is closed
    444 
    445    \return Clipped polygon
    446 */
    447 QPolygon QwtClipper::clipPolygon(
    448     const QRectF &clipRect, const QPolygon &polygon, bool closePolygon )
     366   \param polygon Polygon IN/OUT
     367   \param closePolygon True, when the polygon is closed
     368 */
     369void QwtClipper::clipPolygon(
     370    const QRectF& clipRect, QPolygon& polygon, bool closePolygon )
    449371{
    450372    const int minX = qCeil( clipRect.left() );
    … …  
    455377    const QRect r( minX, minY, maxX - minX, maxY - minY );
    456378
    457     QwtPolygonClipper<QPolygon, QRect, QPoint, int> clipper( r );
    458     return clipper.clipPolygon( polygon, closePolygon );
    459 }
     379    QwtPolygonClipper< QPolygon, QRect, int > clipper( r );
     380    clipper.clipPolygon( polygon, closePolygon );
     381}
     382
     383/*!
     384   Sutherland-Hodgman polygon clipping
     385
     386   \param clipRect Clip rectangle
     387   \param polygon Polygon IN/OUT
     388   \param closePolygon True, when the polygon is closed
     389 */
     390void QwtClipper::clipPolygon(
     391    const QRect& clipRect, QPolygon& polygon, bool closePolygon )
     392{
     393    QwtPolygonClipper< QPolygon, QRect, int > clipper( clipRect );
     394    clipper.clipPolygon( polygon, closePolygon );
     395}
     396
     397/*!
     398   Sutherland-Hodgman polygon clipping
     399
     400   \param clipRect Clip rectangle
     401   \param polygon Polygon IN/OUT
     402   \param closePolygon True, when the polygon is closed
     403 */
     404void QwtClipper::clipPolygonF(
     405    const QRectF& clipRect, QPolygonF& polygon, bool closePolygon )
     406{
     407    QwtPolygonClipper< QPolygonF, QRectF, double > clipper( clipRect );
     408    clipper.clipPolygon( polygon, closePolygon );
     409}
     410
    460411/*!
    461412   Sutherland-Hodgman polygon clipping
    … …  
    466417
    467418   \return Clipped polygon
    468 */
    469 QPolygon QwtClipper::clipPolygon(
    470     const QRect &clipRect, const QPolygon &polygon, bool closePolygon )
    471 {
    472     QwtPolygonClipper<QPolygon, QRect, QPoint, int> clipper( clipRect );
    473     return clipper.clipPolygon( polygon, closePolygon );
    474 }
    475 
     419 */
     420QPolygon QwtClipper::clippedPolygon(
     421    const QRectF& clipRect, const QPolygon& polygon, bool closePolygon )
     422{
     423    QPolygon points( polygon );
     424    clipPolygon( clipRect, points, closePolygon );
     425
     426    return points;
     427}
    476428/*!
    477429   Sutherland-Hodgman polygon clipping
    … …  
    482434
    483435   \return Clipped polygon
    484 */
    485 QPolygonF QwtClipper::clipPolygonF(
    486     const QRectF &clipRect, const QPolygonF &polygon, bool closePolygon )
    487 {
    488     QwtPolygonClipper<QPolygonF, QRectF, QPointF, double> clipper( clipRect );
    489     return clipper.clipPolygon( polygon, closePolygon );
     436 */
     437QPolygon QwtClipper::clippedPolygon(
     438    const QRect& clipRect, const QPolygon& polygon, bool closePolygon )
     439{
     440    QPolygon points( polygon );
     441    clipPolygon( clipRect, points, closePolygon );
     442
     443    return points;
     444}
     445
     446/*!
     447   Sutherland-Hodgman polygon clipping
     448
     449   \param clipRect Clip rectangle
     450   \param polygon Polygon
     451   \param closePolygon True, when the polygon is closed
     452
     453   \return Clipped polygon
     454 */
     455QPolygonF QwtClipper::clippedPolygonF(
     456    const QRectF& clipRect, const QPolygonF& polygon, bool closePolygon )
     457{
     458    QPolygonF points( polygon );
     459    clipPolygonF( clipRect, points, closePolygon );
     460
     461    return points;
    490462}
    491463
    … …  
    502474
    503475   \return Arcs of the circle
    504 */
    505 QVector<QwtInterval> QwtClipper::clipCircle( const QRectF &clipRect,
    506     const QPointF &center, double radius )
     476 */
     477QVector< QwtInterval > QwtClipper::clipCircle( const QRectF& clipRect,
     478    const QPointF& center, double radius )
    507479{
    508480    QwtCircleClipper clipper( clipRect );
Note: See TracChangeset for help on using the changeset viewer.