summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoye <joye>2014-06-26 19:40:40 (GMT)
committerjoye <joye>2014-06-26 19:40:40 (GMT)
commit2a40ac98b233129440f823ca1a50b90d779a64a7 (patch)
tree2070f43333b69f547e4bd02e125d561ce80b1cb0
parent8fcf4d700ddfdaa362006f717d3038912ecd0a59 (diff)
downloadblt-2a40ac98b233129440f823ca1a50b90d779a64a7.zip
blt-2a40ac98b233129440f823ca1a50b90d779a64a7.tar.gz
blt-2a40ac98b233129440f823ca1a50b90d779a64a7.tar.bz2
*** empty log message ***
-rw-r--r--src/bltGrAxis.C20
-rw-r--r--src/bltGraph.C18
-rw-r--r--tests/ps.tcl7
3 files changed, 31 insertions, 14 deletions
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C
index da259c2..63231c1 100644
--- a/src/bltGrAxis.C
+++ b/src/bltGrAxis.C
@@ -36,6 +36,7 @@
#include "bltGrBind.h"
#include "bltGrAxis.h"
#include "bltGrAxisOption.h"
+#include "bltGrPageSetup.h"
#include "bltGrMisc.h"
#include "bltGrDef.h"
#include "bltConfig.h"
@@ -73,7 +74,7 @@ static Tk_OptionSpec optionSpecs[] = {
TK_OPTION_NULL_OK, &listObjOption, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, -1, 0, 0, "-borderwidth", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- "0", -1, Tk_Offset(AxisOptions, borderWidth), 0, NULL, LAYOUT},
+ STD_BORDERWIDTH, -1, Tk_Offset(AxisOptions, borderWidth), 0, NULL, LAYOUT},
{TK_OPTION_BOOLEAN, "-checklimits", "checkLimits", "CheckLimits",
"no", -1, Tk_Offset(AxisOptions, checkLimits), 0, NULL, RESET},
{TK_OPTION_COLOR, "-color", "color", "Color",
@@ -1663,16 +1664,23 @@ void Axis::makeGridLine(double value, Segment2d *sp)
void Axis::print(PostScript* psPtr)
{
AxisOptions* ops = (AxisOptions*)ops_;
+ PageSetupOptions* pops = (PageSetupOptions*)graphPtr_->pageSetup_->ops_;
if (ops->hide || !use_)
return;
psPtr->format("%% Axis \"%s\"\n", name_);
- if (ops->normalBg) {
- int relief = active_ ? ops->activeRelief : ops->relief;
- psPtr->fill3DRectangle(ops->normalBg, left_, top_,
- right_ - left_, bottom_ - top_,
- ops->borderWidth, relief);
+ if (pops->decorations) {
+ if (ops->normalBg) {
+ int relief = active_ ? ops->activeRelief : ops->relief;
+ psPtr->fill3DRectangle(ops->normalBg, left_, top_,
+ right_-left_, bottom_-top_,
+ ops->borderWidth, relief);
+ }
+ }
+ else {
+ psPtr->setClearBackground();
+ psPtr->fillRectangle(left_, top_, right_-left_, bottom_-top_);
}
if (ops->title) {
diff --git a/src/bltGraph.C b/src/bltGraph.C
index 6050f96..980f02e 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -586,14 +586,16 @@ void Graph::printMargins(PostScript* psPtr)
psPtr->append("% Margins\n");
psPtr->fillRectangles(margin, 4);
- psPtr->append("% Interior 3D border\n");
- if (ops->plotBW > 0) {
- int x = left_ - ops->plotBW;
- int y = top_ - ops->plotBW;
- int w = (right_ - left_) + (2*ops->plotBW);
- int h = (bottom_ - top_) + (2*ops->plotBW);
- psPtr->print3DRectangle(ops->normalBg, (double)x, (double)y, w, h,
- ops->plotBW, ops->plotRelief);
+ if (pops->decorations) {
+ psPtr->append("% Interior 3D border\n");
+ if (ops->plotBW > 0) {
+ int x = left_ - ops->plotBW;
+ int y = top_ - ops->plotBW;
+ int w = (right_ - left_) + (2*ops->plotBW);
+ int h = (bottom_ - top_) + (2*ops->plotBW);
+ psPtr->print3DRectangle(ops->normalBg, (double)x, (double)y, w, h,
+ ops->plotBW, ops->plotRelief);
+ }
}
if (ops->title) {
diff --git a/tests/ps.tcl b/tests/ps.tcl
index c562724..0896069 100644
--- a/tests/ps.tcl
+++ b/tests/ps.tcl
@@ -8,7 +8,14 @@ $graph axis configure y -title "Y\nAxis"
$graph element configure data1 -dash {8 3} -showvalues y -smooth step -symbol circle -outline yellow -outlinewidth 3 -pixels 10 -valuefont "times 14 italic" -valuerotate 45
+$graph legend configure -relief raised
+$graph xaxis configure -bg cyan -relief raised
+$graph configure -relief raised
+$graph configure -plotrelief raised
+
$graph postscript output foo.ps
+$graph postscript configure -decorations no
+$graph postscript output bar.ps
#set graph [bltBarGraph $w]