! \internal Finds the highest index of \a data, whose points y value is just below \a y. Assumes y values in \a data points are ordered ascending, as is ensured by \ref getLines/\ref getScatters if the key axis is vertical. Used to calculate the channel fill polygon, see \ref getChannelFillPolygon. */
| 21686 | Used to calculate the channel fill polygon, see \ref getChannelFillPolygon. |
| 21687 | */ |
| 21688 | int QCPGraph::findIndexBelowY(const QVector<QPointF> *data, double y) const |
| 21689 | { |
| 21690 | for (int i=0; i<data->size(); ++i) |
| 21691 | { |
| 21692 | if (data->at(i).y() > y) |
| 21693 | { |
| 21694 | if (i>0) |
| 21695 | return i-1; |
| 21696 | else |
| 21697 | return 0; |
| 21698 | } |
| 21699 | } |
| 21700 | return -1; |
| 21701 | } |
| 21702 | /* end of 'src/plottables/plottable-graph.cpp' */ |
| 21703 | |
| 21704 |