summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjoye <joye>2014-07-01 16:39:34 (GMT)
committerjoye <joye>2014-07-01 16:39:34 (GMT)
commitcd084e3296bb5320da2c5c2074672321ce8bf010 (patch)
tree465326678ac58e8743c9bd7426a7ad0274183f91 /src
parent833a2f239a4fc780e08124efe75c7b323678e408 (diff)
downloadblt-cd084e3296bb5320da2c5c2074672321ce8bf010.zip
blt-cd084e3296bb5320da2c5c2074672321ce8bf010.tar.gz
blt-cd084e3296bb5320da2c5c2074672321ce8bf010.tar.bz2
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/bltGrElemBar.C21
-rw-r--r--src/bltGraph.C1
2 files changed, 14 insertions, 8 deletions
diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C
index 16a9b8d..10b9e65 100644
--- a/src/bltGrElemBar.C
+++ b/src/bltGrElemBar.C
@@ -760,12 +760,15 @@ void BarElement::print(PSOutput* psPtr)
BarStyle *stylePtr = (BarStyle*)Blt_Chain_GetValue(link);
BarPen* penPtr = (BarPen*)stylePtr->penPtr;
BarPenOptions* pops = (BarPenOptions*)penPtr->ops();
+
if (stylePtr->nBars > 0)
printSegments(psPtr, penPtr, stylePtr->bars, stylePtr->nBars);
XColor* colorPtr = pops->errorBarColor;
if (!colorPtr)
colorPtr = pops->outlineColor;
+ if (!colorPtr)
+ colorPtr = Tk_3DBorderColor(pops->fill);
if ((stylePtr->xeb.length > 0) && (pops->errorBarShow & SHOW_X)) {
psPtr->setLineAttributes(colorPtr, pops->errorBarLineWidth,
@@ -803,6 +806,7 @@ void BarElement::printActive(PSOutput* psPtr)
if (nActiveIndices_ > 0) {
mapActive();
+
printSegments(psPtr, penPtr, activeRects_, nActive_);
if (pops->valueShow != SHOW_NONE)
printValues(psPtr, penPtr, activeRects_, nActive_,activeToData_);
@@ -1187,6 +1191,9 @@ void BarElement::drawSegments(Drawable drawable, BarPen* penPtr,
BarPenOptions* pops = (BarPenOptions*)penPtr->ops();
XRectangle *rp, *rend;
for (rp = bars, rend = rp + nBars; rp < rend; rp++) {
+ if ((rp->width < 1) || (rp->height < 1))
+ continue;
+
if (pops->fill)
Tk_Fill3DRectangle(graphPtr_->tkwin_, drawable,
pops->fill, rp->x, rp->y, rp->width, rp->height,
@@ -1258,19 +1265,19 @@ void BarElement::printSegments(PSOutput* psPtr, BarPen* penPtr,
return;
for (rp = bars, rend = rp + nBars; rp < rend; rp++) {
- if ((rp->width < 1) || (rp->height < 1)) {
+ if ((rp->width < 1) || (rp->height < 1))
continue;
- }
+
+ if (pops->fill)
+ psPtr->print3DRectangle(pops->fill, (double)rp->x, (double)rp->y,
+ (int)rp->width, (int)rp->height,
+ pops->borderWidth, pops->relief);
+
if (pops->outlineColor) {
psPtr->setForeground(pops->outlineColor);
psPtr->fillRectangle((double)rp->x, (double)rp->y,
(int)rp->width - 1, (int)rp->height - 1);
}
- if ((pops->fill) && (pops->borderWidth > 0) &&
- (pops->relief != TK_RELIEF_FLAT))
- psPtr->print3DRectangle(pops->fill, (double)rp->x, (double)rp->y,
- (int)rp->width, (int)rp->height,
- pops->borderWidth, pops->relief);
}
}
diff --git a/src/bltGraph.C b/src/bltGraph.C
index f3ac448..3831791 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -398,7 +398,6 @@ int Graph::print(const char* ident, PSOutput* psPtr)
psPtr->setClearBackground();
psPtr->fillRectangle(x, y, w, h);
- psPtr->printRectangle(x, y, w, h);
psPtr->append("gsave\n\n");
// Start