summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bltGrHairs.C8
-rw-r--r--src/bltGrLegd.C4
-rw-r--r--src/bltGrMarker.C13
-rw-r--r--src/bltGraph.C20
-rw-r--r--src/bltGraph.h2
5 files changed, 15 insertions, 32 deletions
diff --git a/src/bltGrHairs.C b/src/bltGrHairs.C
index 2124598..12d0fad 100644
--- a/src/bltGrHairs.C
+++ b/src/bltGrHairs.C
@@ -212,13 +212,7 @@ static void ConfigureCrosshairs(Graph *graphPtr)
XGCValues gcValues;
gcValues.function = GXxor;
- unsigned long int pixel;
- if (graphPtr->plotBg == NULL) {
- // The graph's color option may not have been set yet
- pixel = WhitePixelOfScreen(Tk_Screen(graphPtr->tkwin));
- } else {
- pixel = Blt_BackgroundBorderColor(graphPtr->plotBg)->pixel;
- }
+ unsigned long int pixel = Tk_3DBorderColor(graphPtr->plotBg)->pixel;
gcValues.background = pixel;
gcValues.foreground = (pixel ^ chPtr->colorPtr->pixel);
diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C
index 567992e..eaf8420 100644
--- a/src/bltGrLegd.C
+++ b/src/bltGrLegd.C
@@ -1800,8 +1800,8 @@ void Blt_DrawLegend(Graph *graphPtr, Drawable drawable)
XCopyArea(graphPtr->display, graphPtr->cache, pixmap,
graphPtr->drawGC, legendPtr->x, legendPtr->y, w, h, 0, 0);
} else {
- Blt_FillBackgroundRectangle(tkwin, pixmap, graphPtr->plotBg, 0, 0,
- w, h, TK_RELIEF_FLAT, 0);
+ Tk_Fill3DRectangle(tkwin, pixmap, graphPtr->plotBg, 0, 0,
+ w, h, TK_RELIEF_FLAT, 0);
}
}
else {
diff --git a/src/bltGrMarker.C b/src/bltGrMarker.C
index 796f643..a3be36e 100644
--- a/src/bltGrMarker.C
+++ b/src/bltGrMarker.C
@@ -2969,11 +2969,7 @@ ConfigureLineProc(Marker *markerPtr)
gcValues.function = GXxor;
gcMask |= GCFunction;
- if (graphPtr->plotBg == NULL) {
- pixel = WhitePixelOfScreen(Tk_Screen(graphPtr->tkwin));
- } else {
- pixel = Blt_BackgroundBorderColor(graphPtr->plotBg)->pixel;
- }
+ pixel = Tk_3DBorderColor(graphPtr->plotBg)->pixel;
if (gcMask & GCBackground) {
gcValues.background ^= pixel;
}
@@ -3401,12 +3397,7 @@ ConfigurePolygonProc(Marker *markerPtr)
gcValues.function = GXxor;
gcMask |= GCFunction;
- if (graphPtr->plotBg == NULL) {
- /* The graph's color option may not have been set yet */
- pixel = WhitePixelOfScreen(Tk_Screen(graphPtr->tkwin));
- } else {
- pixel = Blt_BackgroundBorderColor(graphPtr->plotBg)->pixel;
- }
+ pixel = Tk_3DBorderColor(graphPtr->plotBg)->pixel;
if (gcMask & GCBackground) {
gcValues.background ^= pixel;
}
diff --git a/src/bltGraph.C b/src/bltGraph.C
index 5ba625b..6bb5d9d 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -201,9 +201,9 @@ static Tk_OptionSpec optionSpecs[] = {
-1, Tk_Offset(Graph, leftMargin.varName), TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_SYNONYM, "-lm", NULL, NULL, NULL,
-1, 0, 0, "-leftmargin", 0},
- {TK_OPTION_CUSTOM, "-plotbackground", "plotbackground", "PlotBackground",
+ {TK_OPTION_BORDER, "-plotbackground", "plotbackground", "PlotBackground",
DEF_GRAPH_PLOT_BACKGROUND,
- -1, Tk_Offset(Graph, plotBg), 0, &backgroundObjOption,
+ -1, Tk_Offset(Graph, plotBg), 0, NULL,
RESET_WORLD | CACHE_DIRTY},
{TK_OPTION_PIXELS, "-plotborderwidth", "plotBorderWidth", "PlotBorderWidth",
DEF_GRAPH_PLOT_BORDERWIDTH,
@@ -1293,15 +1293,13 @@ static void DrawPlot(Graph* graphPtr, Drawable drawable)
DrawMargins(graphPtr, drawable);
/* Draw the background of the plotting area with 3D border. */
- Blt_FillBackgroundRectangle(graphPtr->tkwin, drawable, graphPtr->plotBg,
- graphPtr->left - graphPtr->plotBW,
- graphPtr->top - graphPtr->plotBW,
- graphPtr->right -
- graphPtr->left + 1 + 2 * graphPtr->plotBW,
- graphPtr->bottom -
- graphPtr->top + 1 + 2 * graphPtr->plotBW,
- graphPtr->plotBW, graphPtr->plotRelief);
-
+ Tk_Fill3DRectangle(graphPtr->tkwin, drawable, graphPtr->plotBg,
+ graphPtr->left-graphPtr->plotBW,
+ graphPtr->top-graphPtr->plotBW,
+ graphPtr->right - graphPtr->left + 1 +2*graphPtr->plotBW,
+ graphPtr->bottom - graphPtr->top + 1 +2*graphPtr->plotBW,
+ graphPtr->plotBW, graphPtr->plotRelief);
+
/* Draw the elements, markers, legend, and axis limits. */
Blt_DrawAxes(graphPtr, drawable);
Blt_DrawGrids(graphPtr, drawable);
diff --git a/src/bltGraph.h b/src/bltGraph.h
index 71fdea5..60f762b 100644
--- a/src/bltGraph.h
+++ b/src/bltGraph.h
@@ -351,7 +351,7 @@ struct _Graph {
* includes the axis lines */
int plotBW; /* Width of interior 3-D border. */
int plotRelief; /* 3-d effect: TK_RELIEF_RAISED etc. */
- Blt_Background plotBg; /* Color of plotting surface */
+ Tk_3DBorder plotBg; /* Color of plotting surface */
/* If non-zero, force plot to conform to aspect ratio W/H */
double aspect;