summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bltGrAxis.C5
-rw-r--r--src/bltGrElemBar.C63
-rw-r--r--src/bltGrElemBar.h18
-rw-r--r--src/bltGrElemLine.C129
-rw-r--r--src/bltGrElemLine.h44
-rw-r--r--src/bltGrMarkerOp.C5
-rw-r--r--src/bltGrMisc.h5
-rw-r--r--src/bltGrPSOutput.C5
-rw-r--r--src/bltGraph.C7
-rw-r--r--src/bltGraphBar.C3
10 files changed, 135 insertions, 149 deletions
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C
index bf58a91..083c3e3 100644
--- a/src/bltGrAxis.C
+++ b/src/bltGrAxis.C
@@ -32,11 +32,6 @@
#include <stdlib.h>
#include <string.h>
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-using namespace std;
-
#include "bltGraph.h"
#include "bltGrAxis.h"
#include "bltGrAxisOption.h"
diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C
index 6d58969..75a01d9 100644
--- a/src/bltGrElemBar.C
+++ b/src/bltGrElemBar.C
@@ -216,7 +216,7 @@ BarElement::~BarElement()
if (builtinPenPtr)
delete builtinPenPtr;
- ResetBar();
+ reset();
if (ops->stylePalette) {
Blt_FreeStylePalette(ops->stylePalette);
@@ -252,7 +252,7 @@ void BarElement::map()
if (!link)
return;
- ResetBar();
+ reset();
if (!ops->coords.x || !ops->coords.y ||
!ops->coords.x->nValues || !ops->coords.y->nValues)
return;
@@ -435,7 +435,7 @@ void BarElement::map()
bars_ = bars;
barToData_ = barToData;
if (nActiveIndices_ > 0)
- MapActiveBars();
+ mapActive();
int size = 20;
if (count > 0)
@@ -461,10 +461,10 @@ void BarElement::map()
(ops->xLow && ops->xLow->nValues > 0)) ||
(ops->xError && ops->xError->nValues > 0) ||
(ops->yError && ops->yError->nValues > 0)) {
- MapErrorBars(dataToStyle);
+ mapErrorBars(dataToStyle);
}
- MergePens(dataToStyle);
+ mergePens(dataToStyle);
free(dataToStyle);
}
@@ -500,7 +500,7 @@ void BarElement::extents(Region2d *regPtr)
// minimum/maximum limits of the element's data points.
if (((BarGraph::BarMode)gops->barMode == BarGraph::STACKED) &&
(barGraphPtr_->nBarGroups_ > 0))
- CheckBarStacks(ops->xAxis, ops->yAxis, &regPtr->top, &regPtr->bottom);
+ checkStacks(ops->xAxis, ops->yAxis, &regPtr->top, &regPtr->bottom);
// Warning: You get what you deserve if the x-axis is logScale
AxisOptions* axisxops = (AxisOptions*)ops->xAxis->ops();
@@ -675,7 +675,7 @@ void BarElement::draw(Drawable drawable)
BarPenOptions* pops = (BarPenOptions*)penPtr->ops();
if (stylePtr->nBars > 0)
- DrawBarSegments(drawable, penPtr, stylePtr->bars, stylePtr->nBars);
+ drawSegments(drawable, penPtr, stylePtr->bars, stylePtr->nBars);
if ((stylePtr->xeb.length > 0) && (pops->errorBarShow & SHOW_X))
Blt_Draw2DSegments(graphPtr_->display_, drawable, penPtr->errorBarGC_,
@@ -686,7 +686,7 @@ void BarElement::draw(Drawable drawable)
stylePtr->yeb.segments, stylePtr->yeb.length);
if (pops->valueShow != SHOW_NONE)
- DrawBarValues(drawable, penPtr, stylePtr->bars, stylePtr->nBars,
+ drawValues(drawable, penPtr, stylePtr->bars, stylePtr->nBars,
barToData_ + count);
count += stylePtr->nBars;
@@ -707,16 +707,16 @@ void BarElement::drawActive(Drawable drawable)
if (nActiveIndices_ > 0) {
if (flags & ACTIVE_PENDING)
- MapActiveBars();
+ mapActive();
- DrawBarSegments(drawable, penPtr, activeRects_, nActive_);
+ drawSegments(drawable, penPtr, activeRects_, nActive_);
if (pops->valueShow != SHOW_NONE)
- DrawBarValues(drawable, penPtr, activeRects_, nActive_, activeToData_);
+ drawValues(drawable, penPtr, activeRects_, nActive_, activeToData_);
}
else if (nActiveIndices_ < 0) {
- DrawBarSegments(drawable, penPtr, bars_, nBars_);
+ drawSegments(drawable, penPtr, bars_, nBars_);
if (pops->valueShow != SHOW_NONE)
- DrawBarValues(drawable, penPtr, bars_, nBars_, barToData_);
+ drawValues(drawable, penPtr, bars_, nBars_, barToData_);
}
}
@@ -761,7 +761,7 @@ void BarElement::print(Blt_Ps ps)
BarPen* penPtr = (BarPen*)stylePtr->penPtr;
BarPenOptions* pops = (BarPenOptions*)penPtr->ops();
if (stylePtr->nBars > 0)
- SegmentsToPostScript(ps, penPtr, stylePtr->bars, stylePtr->nBars);
+ printSegments(ps, penPtr, stylePtr->bars, stylePtr->nBars);
XColor* colorPtr = pops->errorBarColor;
if (!colorPtr)
@@ -782,7 +782,7 @@ void BarElement::print(Blt_Ps ps)
}
if (pops->valueShow != SHOW_NONE)
- BarValuesToPostScript(ps, penPtr, stylePtr->bars, stylePtr->nBars,
+ printValues(ps, penPtr, stylePtr->bars, stylePtr->nBars,
barToData_ + count);
count += stylePtr->nBars;
@@ -805,15 +805,15 @@ void BarElement::printActive(Blt_Ps ps)
if (nActiveIndices_ > 0) {
if (flags & ACTIVE_PENDING)
- MapActiveBars();
- SegmentsToPostScript(ps, penPtr, activeRects_, nActive_);
+ mapActive();
+ printSegments(ps, penPtr, activeRects_, nActive_);
if (pops->valueShow != SHOW_NONE)
- BarValuesToPostScript(ps, penPtr, activeRects_, nActive_,activeToData_);
+ printValues(ps, penPtr, activeRects_, nActive_,activeToData_);
}
else if (nActiveIndices_ < 0) {
- SegmentsToPostScript(ps, penPtr, bars_, nBars_);
+ printSegments(ps, penPtr, bars_, nBars_);
if (pops->valueShow != SHOW_NONE)
- BarValuesToPostScript(ps, penPtr, bars_, nBars_, barToData_);
+ printValues(ps, penPtr, bars_, nBars_, barToData_);
}
}
@@ -856,7 +856,7 @@ void BarElement::ResetStylePalette(Blt_Chain stylePalette)
}
}
-void BarElement::CheckBarStacks(Axis* xAxis, Axis* yAxis,
+void BarElement::checkStacks(Axis* xAxis, Axis* yAxis,
double *minPtr, double *maxPtr)
{
BarGraph* barGraphPtr_ = (BarGraph*)graphPtr_;
@@ -884,7 +884,7 @@ void BarElement::CheckBarStacks(Axis* xAxis, Axis* yAxis,
}
}
-void BarElement::MergePens(BarStyle** dataToStyle)
+void BarElement::mergePens(BarStyle** dataToStyle)
{
BarElementOptions* ops = (BarElementOptions*)ops_;
@@ -977,7 +977,7 @@ void BarElement::MergePens(BarStyle** dataToStyle)
}
}
-void BarElement::MapActiveBars()
+void BarElement::mapActive()
{
if (activeRects_) {
free(activeRects_);
@@ -1011,7 +1011,7 @@ void BarElement::MapActiveBars()
flags &= ~ACTIVE_PENDING;
}
-void BarElement::ResetBar()
+void BarElement::reset()
{
BarElementOptions* ops = (BarElementOptions*)ops_;
@@ -1055,7 +1055,7 @@ void BarElement::ResetBar()
nBars_ = 0;
}
-void BarElement::MapErrorBars(BarStyle **dataToStyle)
+void BarElement::mapErrorBars(BarStyle **dataToStyle)
{
BarElementOptions* ops = (BarElementOptions*)ops_;
@@ -1189,7 +1189,7 @@ void BarElement::MapErrorBars(BarStyle **dataToStyle)
}
}
-void BarElement::DrawBarSegments(Drawable drawable, BarPen* penPtr,
+void BarElement::drawSegments(Drawable drawable, BarPen* penPtr,
XRectangle *bars, int nBars)
{
BarPenOptions* pops = (BarPenOptions*)penPtr->ops();
@@ -1206,7 +1206,7 @@ void BarElement::DrawBarSegments(Drawable drawable, BarPen* penPtr,
}
}
-void BarElement::DrawBarValues(Drawable drawable, BarPen* penPtr,
+void BarElement::drawValues(Drawable drawable, BarPen* penPtr,
XRectangle *bars, int nBars, int *barToData)
{
BarElementOptions* ops = (BarElementOptions*)ops_;
@@ -1256,8 +1256,8 @@ void BarElement::DrawBarValues(Drawable drawable, BarPen* penPtr,
}
}
-void BarElement::SegmentsToPostScript(Blt_Ps ps, BarPen* penPtr,
- XRectangle *bars, int nBars)
+void BarElement::printSegments(Blt_Ps ps, BarPen* penPtr, XRectangle *bars,
+ int nBars)
{
BarPenOptions* pops = (BarPenOptions*)penPtr->ops();
XRectangle *rp, *rend;
@@ -1283,9 +1283,8 @@ void BarElement::SegmentsToPostScript(Blt_Ps ps, BarPen* penPtr,
}
}
-void BarElement::BarValuesToPostScript(Blt_Ps ps, BarPen* penPtr,
- XRectangle *bars, int nBars,
- int *barToData)
+void BarElement::printValues(Blt_Ps ps, BarPen* penPtr, XRectangle *bars,
+ int nBars, int *barToData)
{
BarPenOptions* pops = (BarPenOptions*)penPtr->ops();
BarElementOptions* ops = (BarElementOptions*)ops_;
diff --git a/src/bltGrElemBar.h b/src/bltGrElemBar.h
index d7f4375..001fb12 100644
--- a/src/bltGrElemBar.h
+++ b/src/bltGrElemBar.h
@@ -97,15 +97,15 @@ class BarElement : public Element {
protected:
void ResetStylePalette(Blt_Chain);
- void CheckBarStacks(Axis*, Axis*, double*, double*);
- void MergePens(BarStyle**);
- void MapActiveBars();
- void ResetBar();
- void MapErrorBars(BarStyle**);
- void DrawBarSegments(Drawable, BarPen*, XRectangle*, int);
- void DrawBarValues(Drawable, BarPen*, XRectangle*, int, int*);
- void SegmentsToPostScript(Blt_Ps, BarPen*, XRectangle*, int);
- void BarValuesToPostScript(Blt_Ps, BarPen*, XRectangle*, int, int*);
+ void checkStacks(Axis*, Axis*, double*, double*);
+ void mergePens(BarStyle**);
+ void mapActive();
+ void reset();
+ void mapErrorBars(BarStyle**);
+ void drawSegments(Drawable, BarPen*, XRectangle*, int);
+ void drawValues(Drawable, BarPen*, XRectangle*, int, int*);
+ void printSegments(Blt_Ps, BarPen*, XRectangle*, int);
+ void printValues(Blt_Ps, BarPen*, XRectangle*, int, int*);
public:
BarElement(Graph*, const char*, Tcl_HashEntry*);
diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C
index 9b93816..38d8959 100644
--- a/src/bltGrElemLine.C
+++ b/src/bltGrElemLine.C
@@ -323,11 +323,11 @@ void LineElement::map()
int np = NUMBEROFPOINTS(ops);
MapInfo mi;
- GetScreenPoints(&mi);
- MapSymbols(&mi);
+ getScreenPoints(&mi);
+ mapSymbols(&mi);
if ((flags & ACTIVE_PENDING) && (nActiveIndices_ > 0))
- MapActiveSymbols();
+ mapActiveSymbols();
// Map connecting line segments if they are to be displayed.
smooth_ = (Smoothing)ops->reqSmooth;
@@ -336,7 +336,7 @@ void LineElement::map()
// so both mi.points and mi.nPoints may change.
switch (smooth_) {
case STEP:
- GenerateSteps(&mi);
+ generateSteps(&mi);
break;
case CUBIC:
@@ -345,7 +345,7 @@ void LineElement::map()
if (mi.nScreenPts < 3)
smooth_ = LINEAR;
else
- GenerateSpline(&mi);
+ generateSpline(&mi);
break;
case CATROM:
@@ -353,17 +353,17 @@ void LineElement::map()
if (mi.nScreenPts < 3)
smooth_ = LINEAR;
else
- GenerateParametricSpline(&mi);
+ generateParametricSpline(&mi);
break;
default:
break;
}
if (ops->rTolerance > 0.0)
- ReducePoints(&mi, ops->rTolerance);
+ reducePoints(&mi, ops->rTolerance);
if (ops->fillBg)
- MapFillArea(&mi);
+ mapFillArea(&mi);
mapTraces(&mi);
}
@@ -376,7 +376,7 @@ void LineElement::map()
LineStyle *stylePtr = (LineStyle*)Blt_Chain_GetValue(link);
LinePen* penPtr = (LinePen *)stylePtr->penPtr;
LinePenOptions* penOps = (LinePenOptions*)penPtr->ops();
- int size = ScaleSymbol(penOps->symbol.size);
+ int size = scaleSymbol(penOps->symbol.size);
stylePtr->symbolSize = size;
stylePtr->errorBarCapWidth = (penOps->errorBarCapWidth > 0)
? penOps->errorBarCapWidth : size * 0.6666666;
@@ -390,10 +390,10 @@ void LineElement::map()
(ops->xLow && ops->xLow->nValues > 0)) ||
(ops->xError && ops->xError->nValues > 0) ||
(ops->yError && ops->yError->nValues > 0)) {
- MapErrorBars(styleMap);
+ mapErrorBars(styleMap);
}
- MergePens(styleMap);
+ mergePens(styleMap);
free(styleMap);
}
@@ -529,11 +529,11 @@ void LineElement::closest()
mode = SEARCH_TRACES;
}
if (mode == SEARCH_POINTS)
- ClosestPoint(searchPtr);
+ closestPoint(searchPtr);
else {
- int found = ClosestTrace();
+ int found = closestTrace();
if ((!found) && (searchPtr->along != SEARCH_BOTH))
- ClosestPoint(searchPtr);
+ closestPoint(searchPtr);
}
}
@@ -621,11 +621,11 @@ void LineElement::drawActive(Drawable drawable)
if (ops->hide || !(flags & ACTIVE))
return;
- int symbolSize = ScaleSymbol(penOps->symbol.size);
+ int symbolSize = scaleSymbol(penOps->symbol.size);
if (nActiveIndices_ > 0) {
if (flags & ACTIVE_PENDING)
- MapActiveSymbols();
+ mapActiveSymbols();
if (penOps->symbol.type != SYMBOL_NONE)
drawSymbols(drawable, penPtr, symbolSize, activePts_.length,
@@ -730,14 +730,12 @@ void LineElement::print(Blt_Ps ps)
}
if ((stylePtr->symbolPts.length > 0) &&
(penOps->symbol.type != SYMBOL_NONE)) {
- SymbolsToPostScript(ps, penPtr, stylePtr->symbolSize,
- stylePtr->symbolPts.length,
- stylePtr->symbolPts.points);
+ printSymbols(ps, penPtr, stylePtr->symbolSize,
+ stylePtr->symbolPts.length, stylePtr->symbolPts.points);
}
if (penOps->valueShow != SHOW_NONE) {
- ValuesToPostScript(ps, penPtr, stylePtr->symbolPts.length,
- stylePtr->symbolPts.points,
- symbolPts_.map + count);
+ printValues(ps, penPtr, stylePtr->symbolPts.length,
+ stylePtr->symbolPts.points, symbolPts_.map + count);
}
count += stylePtr->symbolPts.length;
}
@@ -756,29 +754,29 @@ void LineElement::printActive(Blt_Ps ps)
Blt_Ps_Format(ps, "\n%% Active Element \"%s\"\n\n", name_);
- int symbolSize = ScaleSymbol(penOps->symbol.size);
+ int symbolSize = scaleSymbol(penOps->symbol.size);
if (nActiveIndices_ > 0) {
if (flags & ACTIVE_PENDING)
- MapActiveSymbols();
+ mapActiveSymbols();
if (penOps->symbol.type != SYMBOL_NONE)
- SymbolsToPostScript(ps, penPtr, symbolSize, activePts_.length,
+ printSymbols(ps, penPtr, symbolSize, activePts_.length,
activePts_.points);
if (penOps->valueShow != SHOW_NONE)
- ValuesToPostScript(ps, penPtr, activePts_.length, activePts_.points,
- activePts_.map);
+ printValues(ps, penPtr, activePts_.length, activePts_.points,
+ activePts_.map);
}
else if (nActiveIndices_ < 0) {
if ((Blt_Chain_GetLength(traces_) > 0) && (penOps->traceWidth > 0))
printTraces(ps, (LinePen*)penPtr);
if (penOps->symbol.type != SYMBOL_NONE)
- SymbolsToPostScript(ps, penPtr, symbolSize, symbolPts_.length,
- symbolPts_.points);
+ printSymbols(ps, penPtr, symbolSize, symbolPts_.length,
+ symbolPts_.points);
if (penOps->valueShow != SHOW_NONE) {
- ValuesToPostScript(ps, penPtr, symbolPts_.length,
- symbolPts_.points, symbolPts_.map);
+ printValues(ps, penPtr, symbolPts_.length, symbolPts_.points,
+ symbolPts_.map);
}
}
}
@@ -804,13 +802,13 @@ void LineElement::printSymbol(Blt_Ps ps, double x, double y, int size)
Point2d point;
point.x = x;
point.y = y;
- SymbolsToPostScript(ps, penPtr, size, 1, &point);
+ printSymbols(ps, penPtr, size, 1, &point);
}
}
// Support
-double LineElement::DistanceToLine(int x, int y, Point2d *p, Point2d *q,
+double LineElement::distanceToLine(int x, int y, Point2d *p, Point2d *q,
Point2d *t)
{
double right, left, top, bottom;
@@ -839,7 +837,7 @@ double LineElement::DistanceToLine(int x, int y, Point2d *p, Point2d *q,
return hypot((t->x - x), (t->y - y));
}
-double LineElement::DistanceToX(int x, int y, Point2d *p, Point2d *q,
+double LineElement::distanceToX(int x, int y, Point2d *p, Point2d *q,
Point2d *t)
{
double dx, dy;
@@ -885,7 +883,7 @@ double LineElement::DistanceToX(int x, int y, Point2d *p, Point2d *q,
return fabs(d);
}
-double LineElement::DistanceToY(int x, int y, Point2d *p, Point2d *q,
+double LineElement::distanceToY(int x, int y, Point2d *p, Point2d *q,
Point2d *t)
{
double dx, dy;
@@ -932,7 +930,7 @@ double LineElement::DistanceToY(int x, int y, Point2d *p, Point2d *q,
return fabs(d);
}
-int LineElement::ScaleSymbol(int normalSize)
+int LineElement::scaleSymbol(int normalSize)
{
LineElementOptions* ops = (LineElementOptions*)ops_;
@@ -967,7 +965,7 @@ int LineElement::ScaleSymbol(int normalSize)
return newSize;
}
-void LineElement::GetScreenPoints(MapInfo *mapPtr)
+void LineElement::getScreenPoints(MapInfo *mapPtr)
{
LineElementOptions* ops = (LineElementOptions*)ops_;
GraphOptions* gops = (GraphOptions*)graphPtr_->ops_;
@@ -1010,7 +1008,7 @@ void LineElement::GetScreenPoints(MapInfo *mapPtr)
mapPtr->map = map;
}
-void LineElement::ReducePoints(MapInfo *mapPtr, double tolerance)
+void LineElement::reducePoints(MapInfo *mapPtr, double tolerance)
{
int* simple = (int*)malloc(mapPtr->nScreenPts * sizeof(int));
int* map = (int*)malloc(mapPtr->nScreenPts * sizeof(int));
@@ -1084,7 +1082,7 @@ double LineElement::findSplit(Point2d *points, int i, int j, int *split)
return maxDist2;
}
-void LineElement::GenerateSteps(MapInfo *mapPtr)
+void LineElement::generateSteps(MapInfo *mapPtr)
{
int newSize = ((mapPtr->nScreenPts - 1) * 2) + 1;
Point2d *screenPts = (Point2d*)malloc(newSize * sizeof(Point2d));
@@ -1111,7 +1109,7 @@ void LineElement::GenerateSteps(MapInfo *mapPtr)
mapPtr->nScreenPts = newSize;
}
-void LineElement::GenerateSpline(MapInfo *mapPtr)
+void LineElement::generateSpline(MapInfo *mapPtr)
{
int nOrigPts = mapPtr->nScreenPts;
Point2d* origPts = mapPtr->screenPts;
@@ -1197,7 +1195,7 @@ void LineElement::GenerateSpline(MapInfo *mapPtr)
}
}
-void LineElement::GenerateParametricSpline(MapInfo *mapPtr)
+void LineElement::generateParametricSpline(MapInfo *mapPtr)
{
Point2d *origPts, *iPts;
int *map;
@@ -1306,7 +1304,7 @@ void LineElement::GenerateParametricSpline(MapInfo *mapPtr)
}
}
-void LineElement::MapSymbols(MapInfo *mapPtr)
+void LineElement::mapSymbols(MapInfo *mapPtr)
{
Point2d *pp;
int i;
@@ -1331,7 +1329,7 @@ void LineElement::MapSymbols(MapInfo *mapPtr)
symbolPts_.map = map;
}
-void LineElement::MapActiveSymbols()
+void LineElement::mapActiveSymbols()
{
LineElementOptions* ops = (LineElementOptions*)ops_;
@@ -1379,7 +1377,7 @@ void LineElement::MapActiveSymbols()
flags &= ~ACTIVE_PENDING;
}
-void LineElement::MergePens(LineStyle **styleMap)
+void LineElement::mergePens(LineStyle **styleMap)
{
LineElementOptions* ops = (LineElementOptions*)ops_;
@@ -1473,7 +1471,7 @@ void LineElement::MergePens(LineStyle **styleMap)
#define CLIP_RIGHT (1<<2)
#define CLIP_LEFT (1<<3)
-int LineElement::OutCode(Region2d *extsPtr, Point2d *p)
+int LineElement::outCode(Region2d *extsPtr, Point2d *p)
{
int code =0;
if (p->x > extsPtr->right)
@@ -1489,7 +1487,7 @@ int LineElement::OutCode(Region2d *extsPtr, Point2d *p)
return code;
}
-int LineElement::ClipSegment(Region2d *extsPtr, int code1, int code2,
+int LineElement::clipSegment(Region2d *extsPtr, int code1, int code2,
Point2d *p, Point2d *q)
{
int inside = ((code1 | code2) == 0);
@@ -1525,7 +1523,7 @@ int LineElement::ClipSegment(Region2d *extsPtr, int code1, int code2,
(extsPtr->top - p->y) / (q->y - p->y);
p->y = extsPtr->top;
}
- code1 = OutCode(extsPtr, p);
+ code1 = outCode(extsPtr, p);
inside = ((code1 | code2) == 0);
outside = ((code1 & code2) != 0);
@@ -1585,7 +1583,7 @@ void LineElement::mapTraces(MapInfo *mapPtr)
graphPtr_->extents(&exts);
int count = 1;
- int code1 = OutCode(&exts, mapPtr->screenPts);
+ int code1 = outCode(&exts, mapPtr->screenPts);
Point2d* p = mapPtr->screenPts;
Point2d* q = p + 1;
@@ -1595,13 +1593,13 @@ void LineElement::mapTraces(MapInfo *mapPtr)
Point2d s;
s.x = 0;
s.y = 0;
- int code2 = OutCode(&exts, q);
+ int code2 = outCode(&exts, q);
// Save the coordinates of the last point, before clipping
if (code2 != 0)
s = *q;
int broken = BROKEN_TRACE(ops->penDir, p->x, q->x);
- int offscreen = ClipSegment(&exts, code1, code2, p, q);
+ int offscreen = clipSegment(&exts, code1, code2, p, q);
if (broken || offscreen) {
// The last line segment is either totally clipped by the plotting
// area or the x-direction is wrong, breaking the trace. Either
@@ -1635,7 +1633,7 @@ void LineElement::mapTraces(MapInfo *mapPtr)
}
}
-void LineElement::MapFillArea(MapInfo *mapPtr)
+void LineElement::mapFillArea(MapInfo *mapPtr)
{
LineElementOptions* ops = (LineElementOptions*)ops_;
GraphOptions* gops = (GraphOptions*)graphPtr_->ops_;
@@ -1761,7 +1759,7 @@ void LineElement::resetLine()
yeb_.map = NULL;
}
-void LineElement::MapErrorBars(LineStyle **styleMap)
+void LineElement::mapErrorBars(LineStyle **styleMap)
{
LineElementOptions* ops = (LineElementOptions*)ops_;
@@ -1908,7 +1906,7 @@ void LineElement::MapErrorBars(LineStyle **styleMap)
}
}
-int LineElement::ClosestTrace()
+int LineElement::closestTrace()
{
LineElementOptions* ops = (LineElementOptions*)ops_;
GraphOptions* gops = (GraphOptions*)graphPtr_->ops_;
@@ -1933,11 +1931,11 @@ int LineElement::ClosestTrace()
double d;
if (searchPtr->along == SEARCH_X)
- d = DistanceToX(searchPtr->x, searchPtr->y, p, p + 1, &b);
+ d = distanceToX(searchPtr->x, searchPtr->y, p, p + 1, &b);
else if (searchPtr->along == SEARCH_Y)
- d = DistanceToY(searchPtr->x, searchPtr->y, p, p + 1, &b);
+ d = distanceToY(searchPtr->x, searchPtr->y, p, p + 1, &b);
else
- d = DistanceToLine(searchPtr->x, searchPtr->y, p, p + 1, &b);
+ d = distanceToLine(searchPtr->x, searchPtr->y, p, p + 1, &b);
if (d < dMin) {
closest = b;
@@ -1958,7 +1956,7 @@ int LineElement::ClosestTrace()
return 0;
}
-void LineElement::ClosestPoint(ClosestSearch *searchPtr)
+void LineElement::closestPoint(ClosestSearch *searchPtr)
{
LineElementOptions* ops = (LineElementOptions*)ops_;
@@ -2651,7 +2649,7 @@ void LineElement::drawValues(Drawable drawable, LinePen* penPtr,
}
}
-void LineElement::GetSymbolPostScriptInfo(Blt_Ps ps, LinePen* penPtr, int size)
+void LineElement::getSymbolPostScriptInfo(Blt_Ps ps, LinePen* penPtr, int size)
{
LinePenOptions* pops = (LinePenOptions*)penPtr->ops();
@@ -2726,8 +2724,8 @@ void LineElement::GetSymbolPostScriptInfo(Blt_Ps ps, LinePen* penPtr, int size)
Blt_Ps_Append(ps, "} def\n\n");
}
-void LineElement::SymbolsToPostScript(Blt_Ps ps, LinePen* penPtr, int size,
- int nSymbolPts, Point2d *symbolPts)
+void LineElement::printSymbols(Blt_Ps ps, LinePen* penPtr, int size,
+ int nSymbolPts, Point2d *symbolPts)
{
LinePenOptions* pops = (LinePenOptions*)penPtr->ops();
@@ -2736,7 +2734,7 @@ void LineElement::SymbolsToPostScript(Blt_Ps ps, LinePen* penPtr, int size,
{
"Li", "Sq", "Ci", "Di", "Pl", "Cr", "Sp", "Sc", "Tr", "Ar", "Bm", NULL
};
- GetSymbolPostScriptInfo(ps, penPtr, size);
+ getSymbolPostScriptInfo(ps, penPtr, size);
symbolSize = (double)size;
switch (pops->symbol.type) {
@@ -2766,7 +2764,7 @@ void LineElement::SymbolsToPostScript(Blt_Ps ps, LinePen* penPtr, int size,
}
}
-void LineElement::SetLineAttributes(Blt_Ps ps, LinePen* penPtr)
+void LineElement::setLineAttributes(Blt_Ps ps, LinePen* penPtr)
{
LinePenOptions* pops = (LinePenOptions*)penPtr->ops();
@@ -2787,7 +2785,7 @@ void LineElement::SetLineAttributes(Blt_Ps ps, LinePen* penPtr)
void LineElement::printTraces(Blt_Ps ps, LinePen* penPtr)
{
- SetLineAttributes(ps, penPtr);
+ setLineAttributes(ps, penPtr);
for (Blt_ChainLink link = Blt_Chain_FirstLink(traces_); link;
link = Blt_Chain_NextLink(link)) {
bltTrace *tracePtr = (bltTrace*)Blt_Chain_GetValue(link);
@@ -2800,9 +2798,8 @@ void LineElement::printTraces(Blt_Ps ps, LinePen* penPtr)
}
}
-void LineElement::ValuesToPostScript(Blt_Ps ps, LinePen* penPtr,
- int nSymbolPts, Point2d *symbolPts,
- int *pointToData)
+void LineElement::printValues(Blt_Ps ps, LinePen* penPtr, int nSymbolPts,
+ Point2d *symbolPts, int *pointToData)
{
LineElementOptions* ops = (LineElementOptions*)ops_;
LinePenOptions* pops = (LinePenOptions*)penPtr->ops();
diff --git a/src/bltGrElemLine.h b/src/bltGrElemLine.h
index 31ad10b..6611198 100644
--- a/src/bltGrElemLine.h
+++ b/src/bltGrElemLine.h
@@ -113,38 +113,38 @@ class LineElement : public Element {
Blt_Chain traces_;
protected:
- int ScaleSymbol(int);
- void GetScreenPoints(MapInfo*);
- void ReducePoints(MapInfo*, double);
- void GenerateSteps(MapInfo*);
- void GenerateSpline(MapInfo*);
- void GenerateParametricSpline(MapInfo*);
- void MapSymbols(MapInfo*);
- void MapActiveSymbols();
- void MergePens(LineStyle**);
- int OutCode(Region2d*, Point2d*);
- int ClipSegment(Region2d*, int, int, Point2d*, Point2d*);
+ int scaleSymbol(int);
+ void getScreenPoints(MapInfo*);
+ void reducePoints(MapInfo*, double);
+ void generateSteps(MapInfo*);
+ void generateSpline(MapInfo*);
+ void generateParametricSpline(MapInfo*);
+ void mapSymbols(MapInfo*);
+ void mapActiveSymbols();
+ void mergePens(LineStyle**);
+ int outCode(Region2d*, Point2d*);
+ int clipSegment(Region2d*, int, int, Point2d*, Point2d*);
void saveTrace(int, int, MapInfo*);
void freeTraces();
void mapTraces(MapInfo*);
- void MapFillArea(MapInfo*);
+ void mapFillArea(MapInfo*);
+ void mapErrorBars(LineStyle**);
void resetLine();
- void MapErrorBars(LineStyle**);
- int ClosestTrace();
- void ClosestPoint(ClosestSearch*);
+ int closestTrace();
+ void closestPoint(ClosestSearch*);
void drawCircles(Display*, Drawable, LinePen*, int, Point2d*, int);
void drawSquares(Display*, Drawable, LinePen*, int, Point2d*, int);
void drawSymbols(Drawable, LinePen*, int, int, Point2d*);
void drawTraces(Drawable, LinePen*);
void drawValues(Drawable, LinePen*, int, Point2d*, int*);
- void SetLineAttributes(Blt_Ps, LinePen*);
+ void setLineAttributes(Blt_Ps, LinePen*);
void printTraces(Blt_Ps, LinePen*);
- void ValuesToPostScript(Blt_Ps, LinePen*, int, Point2d*, int*);
- double DistanceToLine(int, int, Point2d*, Point2d*, Point2d*);
- double DistanceToX(int, int, Point2d*, Point2d*, Point2d*);
- double DistanceToY(int, int, Point2d*, Point2d*, Point2d*);
- void GetSymbolPostScriptInfo(Blt_Ps, LinePen*, int);
- void SymbolsToPostScript(Blt_Ps, LinePen*, int, int, Point2d*);
+ void printValues(Blt_Ps, LinePen*, int, Point2d*, int*);
+ void printSymbols(Blt_Ps, LinePen*, int, int, Point2d*);
+ double distanceToLine(int, int, Point2d*, Point2d*, Point2d*);
+ double distanceToX(int, int, Point2d*, Point2d*, Point2d*);
+ double distanceToY(int, int, Point2d*, Point2d*, Point2d*);
+ void getSymbolPostScriptInfo(Blt_Ps, LinePen*, int);
int simplify(Point2d*, int, int, double, int*);
double findSplit(Point2d*, int, int, int*);
diff --git a/src/bltGrMarkerOp.C b/src/bltGrMarkerOp.C
index 0e1e676..92b2c08 100644
--- a/src/bltGrMarkerOp.C
+++ b/src/bltGrMarkerOp.C
@@ -29,11 +29,6 @@
#include <string.h>
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-using namespace std;
-
extern "C" {
#include "bltBind.h"
};
diff --git a/src/bltGrMisc.h b/src/bltGrMisc.h
index f75c2db..f5c2a38 100644
--- a/src/bltGrMisc.h
+++ b/src/bltGrMisc.h
@@ -30,6 +30,11 @@
#ifndef __BltGrMisc_h__
#define __BltGrMisc_h__
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+using namespace std;
+
#include <tk.h>
/*
diff --git a/src/bltGrPSOutput.C b/src/bltGrPSOutput.C
index 26abe39..4aca636 100644
--- a/src/bltGrPSOutput.C
+++ b/src/bltGrPSOutput.C
@@ -30,11 +30,6 @@
#include <math.h>
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-using namespace std;
-
extern "C" {
#include <tkPort.h>
#include <tk3d.h>
diff --git a/src/bltGraph.C b/src/bltGraph.C
index 210870e..3a3a740 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -29,11 +29,6 @@
#include <float.h>
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-using namespace std;
-
extern "C" {
#include "bltList.h"
#include "bltBind.h"
@@ -223,6 +218,7 @@ void Graph::configure()
void Graph::map()
{
+ // cerr << "Graph::map()" << endl;
if (flags & RESET_AXES)
resetAxes();
@@ -243,6 +239,7 @@ void Graph::map()
void Graph::draw()
{
+ // cerr << "Graph::draw()" << endl;
GraphOptions* ops = (GraphOptions*)ops_;
flags &= ~REDRAW_PENDING;
diff --git a/src/bltGraphBar.C b/src/bltGraphBar.C
index af6462f..3992191 100644
--- a/src/bltGraphBar.C
+++ b/src/bltGraphBar.C
@@ -361,6 +361,7 @@ void BarGraph::resetAxes()
void BarGraph::initBarSetTable()
{
+ // cerr << "BarGraph::initBarSetTable()" << endl;
BarGraphOptions* ops = (BarGraphOptions*)ops_;
// Free resources associated with a previous frequency table. This includes
@@ -486,6 +487,7 @@ void BarGraph::destroyBarSets()
void BarGraph::resetBarGroups()
{
+ // cerr << "BarGraph::resetBarGroups()" << endl;
BarGroup *gp, *gend;
for (gp = barGroups_, gend = gp + nBarGroups_; gp < gend; gp++) {
gp->lastY = 0.0;
@@ -495,6 +497,7 @@ void BarGraph::resetBarGroups()
void BarGraph::computeBarStacks()
{
+ // cerr << "BarGraph::computsBarStacks()" << endl;
BarGraphOptions* ops = (BarGraphOptions*)ops_;
Blt_ChainLink link;