Changeset 9383 in ntrip for trunk/BNC/qwt/qwt_plot_curve.cpp
- Timestamp:
- Mar 19, 2021, 9:15:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_curve.cpp
r8127 r9383 25 25 static void qwtUpdateLegendIconSize( QwtPlotCurve *curve ) 26 26 { 27 if ( curve->symbol() && 27 if ( curve->symbol() && 28 28 curve->testLegendAttribute( QwtPlotCurve::LegendShowSymbol ) ) 29 29 { … … 68 68 symbol( NULL ), 69 69 attributes( 0 ), 70 paintAttributes( 70 paintAttributes( 71 71 QwtPlotCurve::ClipPolygons | QwtPlotCurve::FilterPoints ), 72 72 legendAttributes( 0 ) … … 225 225 226 226 The curve will take the ownership of the symbol, hence the previously 227 set symbol will be delete by setting a new one. If \p symbol is 227 set symbol will be delete by setting a new one. If \p symbol is 228 228 \c NULL no symbol will be drawn. 229 229 … … 475 475 476 476 if ( !doFit && !doFill ) 477 doIntegers = true; 477 doIntegers = true; 478 478 } 479 479 #endif … … 488 488 if ( doIntegers ) 489 489 { 490 QPolygon polyline = mapper.toPolygon( 490 QPolygon polyline = mapper.toPolygon( 491 491 xMap, yMap, data(), from, to ); 492 492 493 493 if ( d_data->paintAttributes & ClipPolygons ) 494 494 { 495 polyline = QwtClipper::clipPolygon( 495 polyline = QwtClipper::clipPolygon( 496 496 clipRect.toAlignedRect(), polyline, false ); 497 497 } … … 519 519 if ( d_data->paintAttributes & ClipPolygons ) 520 520 { 521 polyline = QwtClipper::clipPolygonF( 521 polyline = QwtClipper::clipPolygonF( 522 522 clipRect, polyline, false ); 523 523 } … … 557 557 void QwtPlotCurve::drawSticks( QPainter *painter, 558 558 const QwtScaleMap &xMap, const QwtScaleMap &yMap, 559 const QRectF &, int from, int to ) const 560 { 559 const QRectF &canvasRect, int from, int to ) const 560 { 561 Q_UNUSED( canvasRect ) 562 561 563 painter->save(); 562 564 painter->setRenderHint( QPainter::Antialiasing, false ); … … 640 642 mapper.setFlag( QwtPointMapper::WeedOutPoints, false ); 641 643 642 QPolygonF points = mapper.toPointsF( 644 QPolygonF points = mapper.toPointsF( 643 645 xMap, yMap, data(), from, to ); 644 646 … … 649 651 { 650 652 const QImage image = mapper.toImage( xMap, yMap, 651 data(), from, to, d_data->pen, 653 data(), from, to, d_data->pen, 652 654 painter->testRenderHint( QPainter::Antialiasing ), 653 655 renderThreadCount() ); … … 680 682 { 681 683 const QPolygon points = mapper.toPoints( 682 xMap, yMap, data(), from, to ); 684 xMap, yMap, data(), from, to ); 683 685 684 686 QwtPainter::drawPoints( painter, points ); … … 686 688 else 687 689 { 688 const QPolygonF points = mapper.toPointsF( 690 const QPolygonF points = mapper.toPointsF( 689 691 xMap, yMap, data(), from, to ); 690 692 … … 761 763 qreal pw = qMax( qreal( 1.0 ), painter->pen().widthF()); 762 764 const QRectF clipRect = canvasRect.adjusted(-pw, -pw, pw, pw); 763 764 const QPolygonF clipped = QwtClipper::clipPolygonF( 765 766 const QPolygonF clipped = QwtClipper::clipPolygonF( 765 767 clipRect, polygon, false ); 766 768 … … 884 886 885 887 /*! 886 \brief Complete a polygon to be a closed polygon including the 888 \brief Complete a polygon to be a closed polygon including the 887 889 area between the original polygon and the baseline. 888 890 … … 902 904 903 905 double baseline = d_data->baseline; 904 906 905 907 if ( orientation() == Qt::Vertical ) 906 908 { … … 947 949 { 948 950 QwtPointMapper mapper; 949 mapper.setFlag( QwtPointMapper::RoundPoints, 951 mapper.setFlag( QwtPointMapper::RoundPoints, 950 952 QwtPainter::roundingAlignment( painter ) ); 951 mapper.setFlag( QwtPointMapper::WeedOutPoints, 953 mapper.setFlag( QwtPointMapper::WeedOutPoints, 952 954 testPaintAttribute( QwtPlotCurve::FilterPoints ) ); 953 955 mapper.setBoundingRect( canvasRect ); … … 974 976 975 977 The interpretation of the baseline depends on the orientation(). 976 With Qt:: Horizontal, the baseline is interpreted as a horizontal line977 at y = baseline(), with Qt:: Vertical, it is interpreted as a vertical978 With Qt::Vertical, the baseline is interpreted as a horizontal line 979 at y = baseline(), with Qt::Horizontal, it is interpreted as a vertical 978 980 line at x = baseline(). 979 981 … … 1050 1052 \return Icon representing the curve on the legend 1051 1053 1052 \param index Index of the legend entry 1054 \param index Index of the legend entry 1053 1055 ( ignored as there is only one ) 1054 1056 \param size Icon size … … 1056 1058 \sa QwtPlotItem::setLegendIconSize(), QwtPlotItem::legendData() 1057 1059 */ 1058 QwtGraphic QwtPlotCurve::legendIcon( int index, 1060 QwtGraphic QwtPlotCurve::legendIcon( int index, 1059 1061 const QSizeF &size ) const 1060 1062 { … … 1154 1156 1155 1157 /*! 1156 \brief Initialize the data by pointing to memory blocks which 1158 \brief Initialize the data by pointing to memory blocks which 1157 1159 are not managed by QwtPlotCurve. 1158 1160 1159 setRawSamples is provided for efficiency. 1161 setRawSamples is provided for efficiency. 1160 1162 It is important to keep the pointers 1161 1163 during the lifetime of the underlying QwtCPointerData class. … … 1167 1169 \sa QwtCPointerData 1168 1170 */ 1169 void QwtPlotCurve::setRawSamples( 1171 void QwtPlotCurve::setRawSamples( 1170 1172 const double *xData, const double *yData, int size ) 1171 1173 { … … 1184 1186 \sa QwtPointArrayData 1185 1187 */ 1186 void QwtPlotCurve::setSamples( 1188 void QwtPlotCurve::setSamples( 1187 1189 const double *xData, const double *yData, int size ) 1188 1190 {
Note:
See TracChangeset
for help on using the changeset viewer.