diff options
Diffstat (limited to 'bltGrMarkerBitmap.C')
-rw-r--r-- | bltGrMarkerBitmap.C | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/bltGrMarkerBitmap.C b/bltGrMarkerBitmap.C index 6648aef..10d5954 100644 --- a/bltGrMarkerBitmap.C +++ b/bltGrMarkerBitmap.C @@ -37,21 +37,6 @@ extern "C" { using namespace Blt; -BitmapMarker::BitmapMarker() : Marker() -{ - anchorPt.x =0; - anchorPt.y =0; - gc =NULL; - fillGC =NULL; - nOutlinePts =0; - width =0; - height =0; -} - -BitmapMarker::~BitmapMarker() -{ -} - // OptionSpecs static Tk_OptionSpec optionSpecs[] = { @@ -116,6 +101,31 @@ static MarkerClass bitmapMarkerClass = { BitmapToPostscriptProc, }; +BitmapMarker::BitmapMarker(Graph* graphPtr) : Marker(graphPtr) +{ + anchorPt.x =0; + anchorPt.y =0; + gc =NULL; + fillGC =NULL; + nOutlinePts =0; + width =0; + height =0; + + classPtr = &bitmapMarkerClass; + ops = (BitmapMarkerOptions*)calloc(1, sizeof(BitmapMarkerOptions)); + optionTable = Tk_CreateOptionTable(graphPtr->interp, optionSpecs); +} + +BitmapMarker::~BitmapMarker() +{ + Graph* graphPtr = obj.graphPtr; + + if (gc) + Tk_FreeGC(graphPtr->display, gc); + if (fillGC) + Tk_FreeGC(graphPtr->display, fillGC); +} + Marker* Blt_CreateBitmapProc(Graph* graphPtr) { BitmapMarker* bmPtr = (BitmapMarker*)calloc(1, sizeof(BitmapMarker)); |