summaryrefslogtreecommitdiffstats
path: root/bltGrMarkerBitmap.C
diff options
context:
space:
mode:
authorjoye <joye>2014-03-27 20:41:01 (GMT)
committerjoye <joye>2014-03-27 20:41:01 (GMT)
commit7172c8a5a0cfc54ceb5427f6420119c1a1877434 (patch)
treee85930372d6b916436dab14936da069aa169745d /bltGrMarkerBitmap.C
parent2d9263e2d2ea565f05b4395bd74014d723b3f3e8 (diff)
downloadblt-7172c8a5a0cfc54ceb5427f6420119c1a1877434.zip
blt-7172c8a5a0cfc54ceb5427f6420119c1a1877434.tar.gz
blt-7172c8a5a0cfc54ceb5427f6420119c1a1877434.tar.bz2
*** empty log message ***
Diffstat (limited to 'bltGrMarkerBitmap.C')
-rw-r--r--bltGrMarkerBitmap.C40
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));