diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrAxis.C | 4 | ||||
-rw-r--r-- | src/bltGrMarkerLine.C | 2 | ||||
-rw-r--r-- | src/bltGrMarkerPolygon.C | 2 | ||||
-rw-r--r-- | src/bltGrMisc.h | 7 | ||||
-rw-r--r-- | src/bltGraph.C | 6 | ||||
-rw-r--r-- | src/bltGraph.h | 6 |
6 files changed, 16 insertions, 11 deletions
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C index 367c55e..fefb643 100644 --- a/src/bltGrAxis.C +++ b/src/bltGrAxis.C @@ -1151,7 +1151,7 @@ void Axis::resetTextStyles() } newGC = graphPtr_->getPrivateGC(gcMask, &gcValues); if (LineIsDashed(ops->major.dashes)) - Blt_SetDashes(graphPtr_->display_, newGC, &ops->major.dashes); + graphPtr_->setDashes(newGC, &ops->major.dashes); if (ops->major.gc) graphPtr_->freePrivateGC(ops->major.gc); @@ -1167,7 +1167,7 @@ void Axis::resetTextStyles() } newGC = graphPtr_->getPrivateGC(gcMask, &gcValues); if (LineIsDashed(ops->minor.dashes)) - Blt_SetDashes(graphPtr_->display_, newGC, &ops->minor.dashes); + graphPtr_->setDashes(newGC, &ops->minor.dashes); if (ops->minor.gc) graphPtr_->freePrivateGC(ops->minor.gc); diff --git a/src/bltGrMarkerLine.C b/src/bltGrMarkerLine.C index e0e5f3f..732c1c4 100644 --- a/src/bltGrMarkerLine.C +++ b/src/bltGrMarkerLine.C @@ -153,7 +153,7 @@ int LineMarker::configure() graphPtr_->freePrivateGC(gc_); if (LineIsDashed(ops->dashes)) - Blt_SetDashes(graphPtr_->display_, newGC, &ops->dashes); + graphPtr_->setDashes(newGC, &ops->dashes); gc_ = newGC; if (ops->xorr) { diff --git a/src/bltGrMarkerPolygon.C b/src/bltGrMarkerPolygon.C index 326e2f2..d7e0dc4 100644 --- a/src/bltGrMarkerPolygon.C +++ b/src/bltGrMarkerPolygon.C @@ -165,7 +165,7 @@ int PolygonMarker::configure() // outlineGC GC newGC = graphPtr_->getPrivateGC(gcMask, &gcValues); if (LineIsDashed(ops->dashes)) - Blt_SetDashes(graphPtr_->display_, newGC, &ops->dashes); + graphPtr_->setDashes(newGC, &ops->dashes); if (outlineGC_) graphPtr_->freePrivateGC(outlineGC_); outlineGC_ = newGC; diff --git a/src/bltGrMisc.h b/src/bltGrMisc.h index f000899..2c21645 100644 --- a/src/bltGrMisc.h +++ b/src/bltGrMisc.h @@ -62,6 +62,11 @@ typedef struct { } Point2d; typedef struct { + Point2d p; + Point2d q; +} Segment2d; + +typedef struct { double left; double right; double top; @@ -85,8 +90,6 @@ namespace Blt { extern char* dupstr(const char*); }; -extern void Blt_SetDashes (Display *display, GC gc, Blt_Dashes *dashesPtr); - extern int Blt_PointInPolygon(Point2d *samplePtr, Point2d *screenPts, int nScreenPts); extern int Blt_GetXY(Tcl_Interp* interp, Tk_Window tkwin, diff --git a/src/bltGraph.C b/src/bltGraph.C index 5b10622..8c1e00e 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -1482,3 +1482,9 @@ void Graph::freePrivateGC(GC gc) XFreeGC(display_, gc); } +void Graph::setDashes(GC gc, Blt_Dashes *dashesPtr) +{ + XSetDashes(display_, gc, dashesPtr->offset, (const char*)dashesPtr->values, + (int)strlen((char*)dashesPtr->values)); +} + diff --git a/src/bltGraph.h b/src/bltGraph.h index 0184f91..a7f0c78 100644 --- a/src/bltGraph.h +++ b/src/bltGraph.h @@ -59,11 +59,6 @@ namespace Blt { class Marker; }; -typedef struct { - Point2d p; - Point2d q; -} Segment2d; - typedef struct Ensemble { const char *name; Tcl_ObjCmdProc *proc; @@ -263,6 +258,7 @@ class Graph : public Pick { void printSegments(Blt_Ps, Segment2d*, int); void printPolyline(Blt_Ps, Point2d*, int); void printMaxPolyline(Blt_Ps, Point2d*, int); + void setDashes(GC, Blt_Dashes*); GC getPrivateGC(unsigned long, XGCValues*); void freePrivateGC(GC); |