diff options
author | joye <joye> | 2014-04-22 18:40:45 (GMT) |
---|---|---|
committer | joye <joye> | 2014-04-22 18:40:45 (GMT) |
commit | aabaad3e8de1dcbb7f64af59e864ef2638b06bf8 (patch) | |
tree | 4d0625465c8d4d81920d0781c71777b3010154e9 /src/bltGrElemLine.C | |
parent | 2e41b4afa2c043c88179fa0f1656b18d101175bc (diff) | |
download | blt-aabaad3e8de1dcbb7f64af59e864ef2638b06bf8.zip blt-aabaad3e8de1dcbb7f64af59e864ef2638b06bf8.tar.gz blt-aabaad3e8de1dcbb7f64af59e864ef2638b06bf8.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltGrElemLine.C')
-rw-r--r-- | src/bltGrElemLine.C | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index 21b38c9..e1c3faa 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -60,8 +60,8 @@ using namespace Blt; #define PointInRegion(e,x,y) (((x) <= (e)->right) && ((x) >= (e)->left) && ((y) <= (e)->bottom) && ((y) >= (e)->top)) #define BROKEN_TRACE(dir,last,next) \ - (((dir == PEN_INCREASING) && (next < last)) || \ - ((dir == PEN_DECREASING) && (next > last))) + (((dir == INCREASING) && (next < last)) || \ + ((dir == DECREASING) && (next > last))) #define DRAW_SYMBOL() ((symbolCounter_ % symbolInterval_) == 0) @@ -233,7 +233,7 @@ static Tk_OptionSpec optionSpecs[] = { LineElement::LineElement(Graph* graphPtr, const char* name, Tcl_HashEntry* hPtr) : Element(graphPtr, name, hPtr) { - smooth_ = PEN_SMOOTH_LINEAR; + smooth_ = LINEAR; fillBgColor_ =NULL; fillGC_ = NULL; fillPts_ =NULL; @@ -366,28 +366,28 @@ void LineElement::map() MapActiveSymbols(); // Map connecting line segments if they are to be displayed. - smooth_ = ops->reqSmooth; + smooth_ = (Smoothing)ops->reqSmooth; if ((np > 1) && (ops->builtinPen.traceWidth > 0)) { // Do smoothing if necessary. This can extend the coordinate array, // so both mi.points and mi.nPoints may change. switch (smooth_) { - case PEN_SMOOTH_STEP: + case STEP: GenerateSteps(&mi); break; - case PEN_SMOOTH_NATURAL: - case PEN_SMOOTH_QUADRATIC: + case NATURAL: + case QUADRATIC: // Can't interpolate with less than three points if (mi.nScreenPts < 3) - smooth_ = PEN_SMOOTH_LINEAR; + smooth_ = LINEAR; else GenerateSpline(&mi); break; - case PEN_SMOOTH_CATROM: + case CATROM: // Can't interpolate with less than three points if (mi.nScreenPts < 3) - smooth_ = PEN_SMOOTH_LINEAR; + smooth_ = LINEAR; else GenerateParametricSpline(&mi); break; @@ -1281,15 +1281,15 @@ void LineElement::GenerateSpline(MapInfo *mapPtr) } niPts = count; result = 0; - if (smooth_ == PEN_SMOOTH_NATURAL) + if (smooth_ == NATURAL) result = Blt_NaturalSpline(origPts, nOrigPts, iPts, niPts); - else if (smooth_ == PEN_SMOOTH_QUADRATIC) + else if (smooth_ == QUADRATIC) result = Blt_QuadraticSpline(origPts, nOrigPts, iPts, niPts); if (!result) { /* The spline interpolation failed. We'll fallback to the current * coordinates and do no smoothing (standard line segments). */ - smooth_ = PEN_SMOOTH_LINEAR; + smooth_ = LINEAR; free(iPts); free(map); } @@ -1389,16 +1389,16 @@ void LineElement::GenerateParametricSpline(MapInfo *mapPtr) count++; niPts = count; result = 0; - if (smooth_ == PEN_SMOOTH_NATURAL) + if (smooth_ == NATURAL) result = Blt_NaturalParametricSpline(origPts, nOrigPts, &exts, 0, iPts, niPts); - else if (smooth_ == PEN_SMOOTH_CATROM) + else if (smooth_ == CATROM) result = Blt_CatromParametricSpline(origPts, nOrigPts, iPts, niPts); if (!result) { /* The spline interpolation failed. We will fall back to the current * coordinates and do no smoothing (standard line segments). */ - smooth_ = PEN_SMOOTH_LINEAR; + smooth_ = LINEAR; free(iPts); free(map); } |