summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bltGrAxis.C13
-rw-r--r--tests/axis.tcl4
-rw-r--r--tests/bargraph.tcl2
-rw-r--r--tests/base.tcl13
-rw-r--r--tests/linegraph.tcl2
-rw-r--r--tests/textmarker.tcl4
6 files changed, 20 insertions, 18 deletions
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C
index 3c61a00..65bbe79 100644
--- a/src/bltGrAxis.C
+++ b/src/bltGrAxis.C
@@ -500,10 +500,12 @@ void Axis::draw(Drawable drawable)
if (ops->hide || !use_)
return;
- if (ops->normalBg)
+ if (ops->normalBg) {
+ int relief = active_ ? ops->activeRelief : ops->relief;
Tk_Fill3DRectangle(graphPtr_->tkwin_, drawable, ops->normalBg,
left_, top_, right_ - left_, bottom_ - top_,
- ops->borderWidth, ops->relief);
+ ops->borderWidth, relief);
+ }
if (ops->title) {
TextStyle ts(graphPtr_);
@@ -517,7 +519,6 @@ void Axis::draw(Drawable drawable)
ts.xPad_ = 1;
ts.yPad_ = 0;
-
ts.drawText(drawable, ops->title, titlePos_.x, titlePos_.y);
}
@@ -1669,10 +1670,12 @@ void Axis::print(Blt_Ps ps)
return;
Blt_Ps_Format(ps, "%% Axis \"%s\"\n", name_);
- if (ops->normalBg)
+ if (ops->normalBg) {
+ int relief = active_ ? ops->activeRelief : ops->relief;
Blt_Ps_Fill3DRectangle(ps, ops->normalBg, left_, top_,
right_ - left_, bottom_ - top_,
- ops->borderWidth, ops->relief);
+ ops->borderWidth, relief);
+ }
if (ops->title) {
TextStyle ts(graphPtr_);
diff --git a/tests/axis.tcl b/tests/axis.tcl
index 1e3b1de..0c2176f 100644
--- a/tests/axis.tcl
+++ b/tests/axis.tcl
@@ -3,7 +3,7 @@ source base.tcl
set w .line
set graph [bltLineGraph $w]
-$graph axis configure x -bd 2 -background cyan -title "X Axis" -limitsformat "%g"
+$graph axis configure x -bd 2 -background cyan -title "X\nAxis" -limitsformat "%g"
$graph axis configure y -bd 2 -background cyan
bltCmd $graph axis activate y
@@ -34,7 +34,7 @@ bltTest3 $graph axis x -gridminorcolor blue
bltTest3 $graph axis x -gridminordashes {8 3}
bltTest3 $graph axis x -gridminorlinewidth 2
bltTest3 $graph axis x -hide yes
-##bltTest3 $graph axis x -justify left
+bltTest3 $graph axis x -justify left
bltTest3 $graph axis x -labeloffset yes
bltTest3 $graph axis x -limitscolor red
bltTest3 $graph axis x -limitsfont "times 18 bold italic"
diff --git a/tests/bargraph.tcl b/tests/bargraph.tcl
index 032c0cd..a4d0097 100644
--- a/tests/bargraph.tcl
+++ b/tests/bargraph.tcl
@@ -31,7 +31,7 @@ bltTest $graph -height 300
#bltTest $graph -highlightcolor
#bltTest $graph -highlightthickness
bltTest $graph -invertxy yes
-#bltTest $graph -justify
+bltTest $graph -justify left
bltTest $graph -leftmargin 50
bltTest $graph -lm 50
bltTest $graph -plotbackground cyan
diff --git a/tests/base.tcl b/tests/base.tcl
index f963003..6cc63c3 100644
--- a/tests/base.tcl
+++ b/tests/base.tcl
@@ -1,4 +1,5 @@
-set sleep 1000
+#set sleep 1000
+set sleep 500
proc bltPlot {w title} {
toplevel $w
@@ -90,12 +91,11 @@ proc bltElements {graph} {
proc bltBarGraph {w} {
global sleep
- set title "Bar Graph"
- bltPlot $w $title
+ bltPlot $w "Bar Graph"
set graph [blt::barchart ${w}.gr \
-width 600 \
-height 500 \
- -title $title \
+ -title "Bar\nGraph" \
-barwidth .2 \
-barmode aligned \
]
@@ -110,12 +110,11 @@ proc bltBarGraph {w} {
proc bltLineGraph {w} {
global sleep
- set title "Line Graph"
- bltPlot $w $title
+ bltPlot $w "Line Graph"
set graph [blt::graph ${w}.gr \
-width 600 \
-height 500 \
- -title $title \
+ -title "Line\nGraph" \
]
pack $graph -expand yes -fill both
bltElements $graph
diff --git a/tests/linegraph.tcl b/tests/linegraph.tcl
index 6a79e2c..574282c 100644
--- a/tests/linegraph.tcl
+++ b/tests/linegraph.tcl
@@ -26,7 +26,7 @@ bltTest $graph -height 300
#bltTest $graph -highlightcolor
#bltTest $graph -highlightthickness
bltTest $graph -invertxy yes
-#bltTest $graph -justify
+bltTest $graph -justify left
bltTest $graph -leftmargin 50
bltTest $graph -lm 50
bltTest $graph -plotbackground cyan
diff --git a/tests/textmarker.tcl b/tests/textmarker.tcl
index a72b767..12b5f23 100644
--- a/tests/textmarker.tcl
+++ b/tests/textmarker.tcl
@@ -4,7 +4,7 @@ set w .line
set graph [bltLineGraph $w]
set mm [$graph marker create text tt -element data2 \
- -coords {1.5 100} -text {Text Marker} -font {24}]
+ -coords {1.5 100} -text "Text\nMarker" -font {24}]
$graph element configure data1 -hide yes
echo "Testing Text Marker..."
@@ -20,7 +20,7 @@ bltTest3 $graph marker $mm -fg cyan
bltTest3 $graph marker $mm -fill yellow
bltTest3 $graph marker $mm -font {times 24 bold italic}
bltTest3 $graph marker $mm -foreground blue
-bltTest3 $graph marker $mm -justify right
+bltTest3 $graph marker $mm -justify left
bltTest3 $graph marker $mm -hide yes
bltTest3 $graph marker $mm -mapx x2
bltTest3 $graph marker $mm -mapy y2