diff options
author | joye <joye> | 2014-03-27 21:47:21 (GMT) |
---|---|---|
committer | joye <joye> | 2014-03-27 21:47:21 (GMT) |
commit | bb72885d88f69002a911d7ffdc54ad2f86430671 (patch) | |
tree | ce8f82021e6976cc35e94239e026a09af6b47c9f /src/bltGrMarkerLine.C | |
parent | 807cee8a45e33554416ec91b7ac5514ae6883f6c (diff) | |
download | blt-bb72885d88f69002a911d7ffdc54ad2f86430671.zip blt-bb72885d88f69002a911d7ffdc54ad2f86430671.tar.gz blt-bb72885d88f69002a911d7ffdc54ad2f86430671.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltGrMarkerLine.C')
-rw-r--r-- | src/bltGrMarkerLine.C | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/src/bltGrMarkerLine.C b/src/bltGrMarkerLine.C index 721e60f..d540813 100644 --- a/src/bltGrMarkerLine.C +++ b/src/bltGrMarkerLine.C @@ -87,7 +87,6 @@ static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_END, NULL, NULL, NULL, NULL, -1, 0, 0, NULL, 0} }; -static MarkerDrawProc DrawLineProc; static MarkerMapProc MapLineProc; static MarkerPointProc PointInLineProc; static MarkerPostscriptProc LineToPostscriptProc; @@ -95,7 +94,6 @@ static MarkerRegionProc RegionInLineProc; static MarkerClass lineMarkerClass = { optionSpecs, - DrawLineProc, MapLineProc, PointInLineProc, RegionInLineProc, @@ -128,7 +126,7 @@ LineMarker::~LineMarker() free(segments); } -int LineMarker::Configure() +int LineMarker::configure() { Graph* graphPtr = obj.graphPtr; LineMarkerOptions* opp = (LineMarkerOptions*)ops; @@ -163,7 +161,7 @@ int LineMarker::Configure() gcValues.foreground ^= pixel; if (drawable != None) - DrawLineProc(this, drawable); + draw(drawable); } GC newGC = Blt_GetPrivateGC(graphPtr->tkwin, gcMask, &gcValues); @@ -177,7 +175,7 @@ int LineMarker::Configure() if (opp->xorr) { if (drawable != None) { MapLineProc(this); - DrawLineProc(this, drawable); + draw(drawable); } return TCL_OK; } @@ -185,6 +183,18 @@ int LineMarker::Configure() return TCL_OK; } +void LineMarker::draw(Drawable drawable) +{ + Graph* graphPtr = obj.graphPtr; + LineMarkerOptions* opp = (LineMarkerOptions*)ops; + + if (nSegments > 0) { + Blt_Draw2DSegments(graphPtr->display, drawable, gc, segments, nSegments); + if (opp->xorr) + xorState = (xorState == 0); + } +} + static int PointInLineProc(Marker* markerPtr, Point2d *samplePtr) { LineMarker *lmPtr = (LineMarker*)markerPtr; @@ -229,21 +239,6 @@ static int RegionInLineProc(Marker* markerPtr, Region2d *extsPtr, int enclosed) } } -static void DrawLineProc(Marker* markerPtr, Drawable drawable) -{ - LineMarker *lmPtr = (LineMarker*)markerPtr; - LineMarkerOptions* ops = (LineMarkerOptions*)lmPtr->ops; - - if (lmPtr->nSegments > 0) { - Graph* graphPtr = markerPtr->obj.graphPtr; - - Blt_Draw2DSegments(graphPtr->display, drawable, lmPtr->gc, - lmPtr->segments, lmPtr->nSegments); - if (ops->xorr) - lmPtr->xorState = (lmPtr->xorState == 0); - } -} - static void LineToPostscriptProc(Marker* markerPtr, Blt_Ps ps) { LineMarker *lmPtr = (LineMarker*)markerPtr; |