summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2018-10-08 12:00:00 (GMT)
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2018-10-08 12:00:00 (GMT)
commit7c97d4ee165ef17cb1e2897925499b0dcfc00aa9 (patch)
treea55b2879f91bab94e99b6ff3c3a08892409ecc7a
parent9b8c9769c0b7ad4e232550609f8e99d3d5b24f3c (diff)
downloadblt-7c97d4ee165ef17cb1e2897925499b0dcfc00aa9.zip
blt-7c97d4ee165ef17cb1e2897925499b0dcfc00aa9.tar.gz
blt-7c97d4ee165ef17cb1e2897925499b0dcfc00aa9.tar.bz2
Draw in order: errorBars, traces, symbols, values
-rw-r--r--generic/tkbltGrElemLine.C26
1 files changed, 17 insertions, 9 deletions
diff --git a/generic/tkbltGrElemLine.C b/generic/tkbltGrElemLine.C
index 19a572e..ac70b7a 100644
--- a/generic/tkbltGrElemLine.C
+++ b/generic/tkbltGrElemLine.C
@@ -534,11 +534,27 @@ void LineElement::draw(Drawable drawable)
delete [] points;
}
+ // Error bars
+ for (ChainLink* link = Chain_FirstLink(ops->stylePalette); link;
+ link = Chain_NextLink(link)) {
+ LineStyle* stylePtr = (LineStyle*)Chain_GetValue(link);
+ LinePen* penPtr = (LinePen *)stylePtr->penPtr;
+ LinePenOptions* penOps = (LinePenOptions*)penPtr->ops();
+
+ if ((stylePtr->xeb.length > 0) && (penOps->errorBarShow & SHOW_X))
+ graphPtr_->drawSegments(drawable, penPtr->errorBarGC_,
+ stylePtr->xeb.segments, stylePtr->xeb.length);
+
+ if ((stylePtr->yeb.length > 0) && (penOps->errorBarShow & SHOW_Y))
+ graphPtr_->drawSegments(drawable, penPtr->errorBarGC_,
+ stylePtr->yeb.segments, stylePtr->yeb.length);
+ }
+
// traces
if ((Chain_GetLength(traces_) > 0) && (penOps->traceWidth > 0))
drawTraces(drawable, penPtr);
- // Symbols, error bars, values
+ // Symbols, values
if (ops->reqMaxSymbols > 0) {
int total = 0;
for (ChainLink* link = Chain_FirstLink(ops->stylePalette); link;
@@ -557,14 +573,6 @@ void LineElement::draw(Drawable drawable)
LinePen* penPtr = (LinePen *)stylePtr->penPtr;
LinePenOptions* penOps = (LinePenOptions*)penPtr->ops();
- if ((stylePtr->xeb.length > 0) && (penOps->errorBarShow & SHOW_X))
- graphPtr_->drawSegments(drawable, penPtr->errorBarGC_,
- stylePtr->xeb.segments, stylePtr->xeb.length);
-
- if ((stylePtr->yeb.length > 0) && (penOps->errorBarShow & SHOW_Y))
- graphPtr_->drawSegments(drawable, penPtr->errorBarGC_,
- stylePtr->yeb.segments, stylePtr->yeb.length);
-
if ((stylePtr->symbolPts.length > 0) &&
(penOps->symbol.type != SYMBOL_NONE))
drawSymbols(drawable, penPtr, stylePtr->symbolSize,