// draw plotter line using QPainter function drawPolyline
void GenePlotter
::drawPlotterLine(QPainter *painter
) {
QRect rect
(Margin, Margin,
width() - 2 * Margin, height() - 2 * Margin);
if (!rect.isValid())
return;
painter->setClipRect(rect.adjusted(+1, +1, -1, -1));
//draw best lines
painter
->setPen
(QPen(Qt
::red,
1.0));
const QPointF* point
=bestPoints.
data();
//bestPoints is a vector painter->drawPolyline(point,bestPoints.size());
//draw average line
painter
->setPen
(QPen(Qt
::blue,
1.0));
//X is the same point=avgPoints.data(); //avgPoints is also a vector
painter->drawPolyline(point,avgPoints.size());
// draw plotter line using QPainter function drawPolyline
void GenePlotter::drawPlotterLine(QPainter *painter)
{
QRect rect(Margin, Margin,
width() - 2 * Margin, height() - 2 * Margin);
if (!rect.isValid())
return;
painter->setClipRect(rect.adjusted(+1, +1, -1, -1));
//draw best lines
painter->setPen(QPen(Qt::red,1.0));
const QPointF* point=bestPoints.data(); //bestPoints is a vector
painter->drawPolyline(point,bestPoints.size());
//draw average line
painter->setPen(QPen(Qt::blue,1.0)); //X is the same
point=avgPoints.data(); //avgPoints is also a vector
painter->drawPolyline(point,avgPoints.size());
To copy to clipboard, switch view to plain text mode
Bookmarks