mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Generic Chart Slope Paint
.. full for scatter, in selection rect for line. Seems a compromise between providing useful context on a scatter and avoiding lots of noise on a line chart.
This commit is contained in:
@@ -237,11 +237,14 @@ void GenericSelectTool::paint(QPainter*painter, const QStyleOptionGraphicsItem *
|
||||
line.setStyle(Qt::SolidLine);
|
||||
line.setWidthF(0.5 * dpiXFactor);
|
||||
painter->setPen(line);
|
||||
//painter->setClipRect(r);
|
||||
painter->setClipRect(mapRectFromScene(host->qchart->plotArea()));
|
||||
if (host->charttype == GC_CHART_LINE) painter->setClipRect(r); // too jarring on a line plot
|
||||
else painter->setClipRect(mapRectFromScene(host->qchart->plotArea())); // need context for a scatter plot
|
||||
painter->drawLine(startp, stopp);
|
||||
}
|
||||
|
||||
// reset clip to the plot area
|
||||
painter->setClipRect(mapRectFromScene(host->qchart->plotArea()));
|
||||
|
||||
// scene coordinate for min/max (remember we get clipped)
|
||||
QPointF minxp = mapFromScene(host->qchart->mapToPosition(QPointF(calc.x.min,0),calc.series));
|
||||
QPointF maxxp = mapFromScene(host->qchart->mapToPosition(QPointF(calc.x.max,0),calc.series));
|
||||
|
||||
@@ -4119,8 +4119,6 @@ RTool::configureAxis(SEXP name, SEXP visible, SEXP align, SEXP min, SEXP max,
|
||||
Q_UNUSED(align) // we always pass -1 for now
|
||||
Q_UNUSED(categories) // XXX TODO
|
||||
|
||||
fprintf(stderr, "configure axis...\n"); fflush(stderr);
|
||||
|
||||
if (rtool == NULL || rtool->context == NULL || rtool->chart == NULL) return Rf_allocVector(INTSXP, 0);
|
||||
|
||||
GenericAxisInfo info;
|
||||
|
||||
Reference in New Issue
Block a user