From 6f6b4207c4a700e54909da932cb77cc97e9e31c8 Mon Sep 17 00:00:00 2001 From: joye Date: Mon, 16 Jun 2014 22:22:04 +0000 Subject: *** empty log message *** --- src/bltGrElemLine.C | 19 +++++-------------- tests/barelement.tcl | 7 +++++++ tests/barpen.tcl | 7 +++++++ tests/lineelement.tcl | 9 ++++++++- 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index 9f8da0a..dfc4e44 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -528,7 +528,7 @@ void LineElement::draw(Drawable drawable) return; // Fill area under the curve - if (fillPts_) { + if (ops->fillBg && fillPts_) { XPoint *points = (XPoint*)malloc(sizeof(XPoint) * nFillPts_); unsigned int count =0; @@ -539,9 +539,8 @@ void LineElement::draw(Drawable drawable) points[count].y = pp->y; count++; } - if (ops->fillBg) - Tk_Fill3DPolygon(graphPtr_->tkwin_, drawable, ops->fillBg, points, - nFillPts_, 0, TK_RELIEF_FLAT); + Tk_Fill3DPolygon(graphPtr_->tkwin_, drawable, ops->fillBg, points, + nFillPts_, 0, TK_RELIEF_FLAT); free(points); } @@ -665,18 +664,10 @@ void LineElement::print(PostScript* psPtr) psPtr->format("\n%% Element \"%s\"\n\n", name_); // Draw fill area - if (fillPts_) { - // Create a path to use for both the polygon and its outline + if (ops->fillBg && fillPts_) { psPtr->append("% start fill area\n"); psPtr->printPolyline(fillPts_, nFillPts_); - - // If the background fill color was specified, draw the polygon in a - // solid fashion with that color - if (ops->fillBg) - psPtr->append("gsave fill grestore\n"); - else - psPtr->append("gsave fill grestore\n"); - + psPtr->append("gsave fill grestore\n"); psPtr->append("% end fill area\n"); } diff --git a/tests/barelement.tcl b/tests/barelement.tcl index 247bd79..513a7da 100644 --- a/tests/barelement.tcl +++ b/tests/barelement.tcl @@ -40,7 +40,14 @@ bltTest3 $graph element data1 -showvalues x $dops bltTest3 $graph element data1 -showvalues both $dops #bltTest3 $graph element data2 -stack $dops #bltTest3 $graph element data2 -styles $dops +bltTest3 $graph element data1 -valueanchor nw $dops bltTest3 $graph element data1 -valueanchor n $dops +bltTest3 $graph element data1 -valueanchor ne $dops +bltTest3 $graph element data1 -valueanchor e $dops +bltTest3 $graph element data1 -valueanchor se $dops +bltTest3 $graph element data1 -valueanchor s $dops +bltTest3 $graph element data1 -valueanchor sw $dops +bltTest3 $graph element data1 -valueanchor w $dops bltTest3 $graph element data1 -valuecolor cyan $dops bltTest3 $graph element data1 -valuefont {times 18 bold italic} $dops bltTest3 $graph element data1 -valueformat "%e" $dops diff --git a/tests/barpen.tcl b/tests/barpen.tcl index 2a02e50..e313a81 100644 --- a/tests/barpen.tcl +++ b/tests/barpen.tcl @@ -25,7 +25,14 @@ bltTest3 $graph pen foo -showerrorbars no $dops bltTest3 $graph pen foo -showvalues none $dops bltTest3 $graph pen foo -showvalues x $dops bltTest3 $graph pen foo -showvalues both $dops +bltTest3 $graph pen foo -valueanchor nw $dops bltTest3 $graph pen foo -valueanchor n $dops +bltTest3 $graph pen foo -valueanchor ne $dops +bltTest3 $graph pen foo -valueanchor e $dops +bltTest3 $graph pen foo -valueanchor se $dops +bltTest3 $graph pen foo -valueanchor s $dops +bltTest3 $graph pen foo -valueanchor sw $dops +bltTest3 $graph pen foo -valueanchor w $dops bltTest3 $graph pen foo -valuecolor cyan $dops bltTest3 $graph pen foo -valuefont {times 18 bold italic} $dops bltTest3 $graph pen foo -valueformat "%e" $dops diff --git a/tests/lineelement.tcl b/tests/lineelement.tcl index 734a8ab..95b732b 100644 --- a/tests/lineelement.tcl +++ b/tests/lineelement.tcl @@ -5,7 +5,7 @@ set graph [bltLineGraph $w] $graph element configure data1 -dash {8 3} -showvalues y -smooth step -symbol circle -outline yellow -outlinewidth 3 -pixels 10 -$graph pen create foo -showvalues y -symbol circle -dashes {8 3} -color purple +$graph pen create foo -showvalues y -symbol circle -dashes {8 3} -color purple -linewidth 2 $graph element activate data3 echo "Testing Line Element.." @@ -53,7 +53,14 @@ bltTest3 $graph element data1 -symbol splus $dops bltTest3 $graph element data1 -symbol square $dops bltTest3 $graph element data1 -symbol triangle $dops bltTest3 $graph element data2 -trace both $dops +bltTest3 $graph element data1 -valueanchor nw $dops bltTest3 $graph element data1 -valueanchor n $dops +bltTest3 $graph element data1 -valueanchor ne $dops +bltTest3 $graph element data1 -valueanchor e $dops +bltTest3 $graph element data1 -valueanchor se $dops +bltTest3 $graph element data1 -valueanchor s $dops +bltTest3 $graph element data1 -valueanchor sw $dops +bltTest3 $graph element data1 -valueanchor w $dops bltTest3 $graph element data1 -valuecolor cyan $dops bltTest3 $graph element data1 -valuefont {times 18 bold italic} $dops bltTest3 $graph element data1 -valueformat "%e" $dops -- cgit v0.12