diff options
author | joye <joye> | 2014-06-27 19:49:47 (GMT) |
---|---|---|
committer | joye <joye> | 2014-06-27 19:49:47 (GMT) |
commit | 4c23f3621903e2d983f2925dfa56c8992dec57be (patch) | |
tree | bf15efe6503185e79c77901e221039683a2d2013 /src | |
parent | 90073c46c67c57a7387edb09643617d61450442d (diff) | |
download | blt-4c23f3621903e2d983f2925dfa56c8992dec57be.zip blt-4c23f3621903e2d983f2925dfa56c8992dec57be.tar.gz blt-4c23f3621903e2d983f2925dfa56c8992dec57be.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrAxisOption.C | 2 | ||||
-rw-r--r-- | src/bltGrElemBar.C | 14 | ||||
-rw-r--r-- | src/bltGrElemLine.C | 20 | ||||
-rw-r--r-- | src/bltGrMarker.C | 4 | ||||
-rw-r--r-- | src/bltGrMarkerLine.C | 6 | ||||
-rw-r--r-- | src/bltGrMarkerPolygon.C | 6 | ||||
-rw-r--r-- | src/bltGrMarkerText.C | 2 | ||||
-rw-r--r-- | src/bltGrMisc.C | 2 | ||||
-rw-r--r-- | src/bltGrMisc.h | 6 | ||||
-rw-r--r-- | src/bltGrPenOption.C | 2 | ||||
-rw-r--r-- | src/bltGraph.C | 4 |
11 files changed, 34 insertions, 34 deletions
diff --git a/src/bltGrAxisOption.C b/src/bltGrAxisOption.C index 602138c..88f12d3 100644 --- a/src/bltGrAxisOption.C +++ b/src/bltGrAxisOption.C @@ -61,7 +61,7 @@ static int AxisSetProc(ClientData clientData, Tcl_Interp* interp, if (!axisPtrPtr) return TCL_OK; - Graph* graphPtr = Blt_GetGraphFromWindowData(tkwin); + Graph* graphPtr = GetGraphFromWindowData(tkwin); ClassId classId = (ClassId)(long(clientData)); Axis *axisPtr; diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C index ee53f91..3723faf 100644 --- a/src/bltGrElemBar.C +++ b/src/bltGrElemBar.C @@ -632,7 +632,7 @@ void BarElement::closest() Point2d *pp, *pend; for (pp=outline, pend=outline+4; pp<pend; pp++) { - Point2d t = Blt_GetProjection(searchPtr->x, searchPtr->y, pp, pp + 1); + Point2d t = GetProjection(searchPtr->x, searchPtr->y, pp, pp + 1); if (t.x > right) t.x = right; else if (t.x < left) @@ -1090,7 +1090,7 @@ void BarElement::mapErrorBars(BarStyle **dataToStyle) Point2d q = graphPtr_->map2D(low, y, ops->xAxis, ops->yAxis); segPtr->p = p; segPtr->q = q; - if (Blt_LineRectClip(®, &segPtr->p, &segPtr->q)) { + if (LineRectClip(®, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = ii; } @@ -1098,7 +1098,7 @@ void BarElement::mapErrorBars(BarStyle **dataToStyle) segPtr->p.x = segPtr->q.x = p.x; segPtr->p.y = p.y - stylePtr->errorBarCapWidth; segPtr->q.y = p.y + stylePtr->errorBarCapWidth; - if (Blt_LineRectClip(®, &segPtr->p, &segPtr->q)) { + if (LineRectClip(®, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = ii; } @@ -1106,7 +1106,7 @@ void BarElement::mapErrorBars(BarStyle **dataToStyle) segPtr->p.x = segPtr->q.x = q.x; segPtr->p.y = q.y - stylePtr->errorBarCapWidth; segPtr->q.y = q.y + stylePtr->errorBarCapWidth; - if (Blt_LineRectClip(®, &segPtr->p, &segPtr->q)) { + if (LineRectClip(®, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = ii; } @@ -1152,7 +1152,7 @@ void BarElement::mapErrorBars(BarStyle **dataToStyle) Point2d q = graphPtr_->map2D(x, low, ops->xAxis, ops->yAxis); segPtr->p = p; segPtr->q = q; - if (Blt_LineRectClip(®, &segPtr->p, &segPtr->q)) { + if (LineRectClip(®, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = ii; } @@ -1160,7 +1160,7 @@ void BarElement::mapErrorBars(BarStyle **dataToStyle) segPtr->p.y = segPtr->q.y = p.y; segPtr->p.x = p.x - stylePtr->errorBarCapWidth; segPtr->q.x = p.x + stylePtr->errorBarCapWidth; - if (Blt_LineRectClip(®, &segPtr->p, &segPtr->q)) { + if (LineRectClip(®, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = ii; } @@ -1168,7 +1168,7 @@ void BarElement::mapErrorBars(BarStyle **dataToStyle) segPtr->p.y = segPtr->q.y = q.y; segPtr->p.x = q.x - stylePtr->errorBarCapWidth; segPtr->q.x = q.x + stylePtr->errorBarCapWidth; - if (Blt_LineRectClip(®, &segPtr->p, &segPtr->q)) { + if (LineRectClip(®, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = ii; } diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C index b36e5de..cf1f7a3 100644 --- a/src/bltGrElemLine.C +++ b/src/bltGrElemLine.C @@ -793,7 +793,7 @@ double LineElement::distanceToLine(int x, int y, Point2d *p, Point2d *q, { double right, left, top, bottom; - *t = Blt_GetProjection(x, y, p, q); + *t = GetProjection(x, y, p, q); if (p->x > q->x) right = p->x, left = q->x; else @@ -1199,7 +1199,7 @@ void LineElement::generateParametricSpline(MapInfo *mapPtr) p = origPts[i]; q = origPts[j]; count++; - if (Blt_LineRectClip(&exts, &p, &q)) { + if (LineRectClip(&exts, &p, &q)) { count += (int)(hypot(q.x - p.x, q.y - p.y) * 0.5); } } @@ -1237,7 +1237,7 @@ void LineElement::generateParametricSpline(MapInfo *mapPtr) /* Is any part of the interval (line segment) in the plotting * area? */ - if (Blt_LineRectClip(&exts, &p, &q)) { + if (LineRectClip(&exts, &p, &q)) { double dp, dq; /* Distance of original point to p. */ @@ -1674,7 +1674,7 @@ void LineElement::mapFillArea(MapInfo *mapPtr) } Point2d *clipPts = (Point2d*)malloc(sizeof(Point2d) * np * 3); - np = Blt_PolyRectClip(&exts, origPts, np - 1, clipPts); + np = PolyRectClip(&exts, origPts, np - 1, clipPts); free(origPts); if (np < 3) @@ -1786,7 +1786,7 @@ void LineElement::mapErrorBars(LineStyle **styleMap) q = graphPtr_->map2D(low, y, ops->xAxis, ops->yAxis); segPtr->p = p; segPtr->q = q; - if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) { + if (LineRectClip(&exts, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = i; } @@ -1794,7 +1794,7 @@ void LineElement::mapErrorBars(LineStyle **styleMap) segPtr->p.x = segPtr->q.x = p.x; segPtr->p.y = p.y - stylePtr->errorBarCapWidth; segPtr->q.y = p.y + stylePtr->errorBarCapWidth; - if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) { + if (LineRectClip(&exts, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = i; } @@ -1802,7 +1802,7 @@ void LineElement::mapErrorBars(LineStyle **styleMap) segPtr->p.x = segPtr->q.x = q.x; segPtr->p.y = q.y - stylePtr->errorBarCapWidth; segPtr->q.y = q.y + stylePtr->errorBarCapWidth; - if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) { + if (LineRectClip(&exts, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = i; } @@ -1855,7 +1855,7 @@ void LineElement::mapErrorBars(LineStyle **styleMap) q = graphPtr_->map2D(x, low, ops->xAxis, ops->yAxis); segPtr->p = p; segPtr->q = q; - if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) { + if (LineRectClip(&exts, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = i; } @@ -1863,7 +1863,7 @@ void LineElement::mapErrorBars(LineStyle **styleMap) segPtr->p.y = segPtr->q.y = p.y; segPtr->p.x = p.x - stylePtr->errorBarCapWidth; segPtr->q.x = p.x + stylePtr->errorBarCapWidth; - if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) { + if (LineRectClip(&exts, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = i; } @@ -1871,7 +1871,7 @@ void LineElement::mapErrorBars(LineStyle **styleMap) segPtr->p.y = segPtr->q.y = q.y; segPtr->p.x = q.x - stylePtr->errorBarCapWidth; segPtr->q.x = q.x + stylePtr->errorBarCapWidth; - if (Blt_LineRectClip(&exts, &segPtr->p, &segPtr->q)) { + if (LineRectClip(&exts, &segPtr->p, &segPtr->q)) { segPtr++; *indexPtr++ = i; } diff --git a/src/bltGrMarker.C b/src/bltGrMarker.C index fb20c25..84910f4 100644 --- a/src/bltGrMarker.C +++ b/src/bltGrMarker.C @@ -165,7 +165,7 @@ int Marker::regionInPolygon(Region2d *regionPtr, Point2d *points, int nPoints, p = *pp; q = *(pp + 1); - if (Blt_LineRectClip(regionPtr, &p, &q)) + if (LineRectClip(regionPtr, &p, &q)) return 1; } @@ -175,7 +175,7 @@ int Marker::regionInPolygon(Region2d *regionPtr, Point2d *points, int nPoints, r.x = regionPtr->left; r.y = regionPtr->top; - return Blt_PointInPolygon(&r, points, nPoints); + return PointInPolygon(&r, points, nPoints); } } diff --git a/src/bltGrMarkerLine.C b/src/bltGrMarkerLine.C index c17fa7d..e3eeb6e 100644 --- a/src/bltGrMarkerLine.C +++ b/src/bltGrMarkerLine.C @@ -180,7 +180,7 @@ void LineMarker::map() next.y += ops->yOffset; Point2d q = next; - if (Blt_LineRectClip(&extents, &p, &q)) { + if (LineRectClip(&extents, &p, &q)) { segPtr->p = p; segPtr->q = q; segPtr++; @@ -205,7 +205,7 @@ int LineMarker::pointInSegments(Point2d* samplePtr, Segment2d* segments, double minDist = DBL_MAX; Segment2d *sp, *send; for (sp = segments, send = sp + nSegments; sp < send; sp++) { - Point2d t = Blt_GetProjection((int)samplePtr->x, (int)samplePtr->y, + Point2d t = GetProjection((int)samplePtr->x, (int)samplePtr->y, &sp->p, &sp->q); double right; double left; @@ -268,7 +268,7 @@ int LineMarker::regionIn(Region2d *extsPtr, int enclosed) pp < pend; pp++) { Point2d p = mapPoint(pp, ops->xAxis, ops->yAxis); Point2d q = mapPoint(pp + 1, ops->xAxis, ops->yAxis); - if (Blt_LineRectClip(extsPtr, &p, &q)) + if (LineRectClip(extsPtr, &p, &q)) count++; } return (count > 0); /* At least 1 segment passes through diff --git a/src/bltGrMarkerPolygon.C b/src/bltGrMarkerPolygon.C index 3ad26d2..f701cec 100644 --- a/src/bltGrMarkerPolygon.C +++ b/src/bltGrMarkerPolygon.C @@ -228,7 +228,7 @@ void PolygonMarker::map() if (ops->fill) { Point2d* lfillPts = new Point2d[nScreenPts * 3]; int n = - Blt_PolyRectClip(&extents, screenPts, ops->worldPts->num,lfillPts); + PolyRectClip(&extents, screenPts, ops->worldPts->num,lfillPts); if (n < 3) delete [] lfillPts; else { @@ -251,7 +251,7 @@ void PolygonMarker::map() for (sp = screenPts, send = sp + (nScreenPts - 1); sp < send; sp++) { segPtr->p = sp[0]; segPtr->q = sp[1]; - if (Blt_LineRectClip(&extents, &segPtr->p, &segPtr->q)) { + if (LineRectClip(&extents, &segPtr->p, &segPtr->q)) { segPtr++; } } @@ -269,7 +269,7 @@ int PolygonMarker::pointIn(Point2d *samplePtr) PolygonMarkerOptions* ops = (PolygonMarkerOptions*)ops_; if (ops->worldPts && (ops->worldPts->num >= 3) && screenPts_) - return Blt_PointInPolygon(samplePtr, screenPts_, ops->worldPts->num + 1); + return PointInPolygon(samplePtr, screenPts_, ops->worldPts->num + 1); return 0; } diff --git a/src/bltGrMarkerText.C b/src/bltGrMarkerText.C index 09f2cf3..b5a849c 100644 --- a/src/bltGrMarkerText.C +++ b/src/bltGrMarkerText.C @@ -217,7 +217,7 @@ int TextMarker::pointIn(Point2d *samplePtr) points[ii].x = outline_[ii].x + anchorPt_.x; points[ii].y = outline_[ii].y + anchorPt_.y; } - return Blt_PointInPolygon(samplePtr, points, 5); + return PointInPolygon(samplePtr, points, 5); } return ((samplePtr->x >= anchorPt_.x) && diff --git a/src/bltGrMisc.C b/src/bltGrMisc.C index eb896c0..377e447 100644 --- a/src/bltGrMisc.C +++ b/src/bltGrMisc.C @@ -329,7 +329,7 @@ Point2d Blt::GetProjection(int x, int y, Point2d *p, Point2d *q) return t; } -Graph* Blt::GetGraphFromWindowData(Tk_Window tkwin) +Graph* Blt::getGraphFromWindowData(Tk_Window tkwin) { while (tkwin) { TkWindow* winPtr = (TkWindow*)tkwin; diff --git a/src/bltGrMisc.h b/src/bltGrMisc.h index 63c8297..5c41969 100644 --- a/src/bltGrMisc.h +++ b/src/bltGrMisc.h @@ -88,12 +88,12 @@ namespace Blt { } Dashes; extern char* dupstr(const char*); - extern int PointInPolygon(Point2d *samplePtr, Point2d *screenPts, + extern int pointInPolygon(Point2d *samplePtr, Point2d *screenPts, int nScreenPts); - extern int PolyRectClip(Region2d *extsPtr, Point2d *inputPts, + extern int polyRectClip(Region2d *extsPtr, Point2d *inputPts, int nInputPts, Point2d *outputPts); extern int LineRectClip(Region2d *regionPtr, Point2d *p, Point2d *q); - extern Point2d GetProjection (int x, int y, Point2d *p, Point2d *q); + extern Point2d getProjection (int x, int y, Point2d *p, Point2d *q); extern Graph* getGraphFromWindowData(Tk_Window tkwin); }; diff --git a/src/bltGrPenOption.C b/src/bltGrPenOption.C index 3aab56b..be6fa44 100644 --- a/src/bltGrPenOption.C +++ b/src/bltGrPenOption.C @@ -57,7 +57,7 @@ static int PenSetProc(ClientData clientData, Tcl_Interp* interp, return TCL_OK; } - Graph* graphPtr = Blt_GetGraphFromWindowData(tkwin); + Graph* graphPtr = Blt::GetGraphFromWindowData(tkwin); Pen* penPtr; if (graphPtr->getPen(*objPtr, &penPtr) != TCL_OK) return TCL_ERROR; diff --git a/src/bltGraph.C b/src/bltGraph.C index c80a65d..87697aa 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -1222,7 +1222,7 @@ Axis* Graph::nearestAxis(int x, int y) t.y = y - t.y - (rh * 0.5); bbox[4] = bbox[0]; - if (Blt_PointInPolygon(&t, bbox, 5)) { + if (PointInPolygon(&t, bbox, 5)) { return axisPtr; } } @@ -1242,7 +1242,7 @@ Axis* Graph::nearestAxis(int x, int y) t.y = y - t.y - (rh * 0.5); bbox[4] = bbox[0]; - if (Blt_PointInPolygon(&t, bbox, 5)) { + if (PointInPolygon(&t, bbox, 5)) { return axisPtr; } } |