summaryrefslogtreecommitdiffstats
path: root/src/bltGraph.C
diff options
context:
space:
mode:
authorjoye <joye>2014-05-30 21:16:38 (GMT)
committerjoye <joye>2014-05-30 21:16:38 (GMT)
commitb4e1bb34955d01729ee9e29bae532c06b71b1afa (patch)
treef9bc91e6f71c5c3063108333b91478ed7063ebe7 /src/bltGraph.C
parent29c03bcc9df76650f217afa91a739490a5e394bc (diff)
downloadblt-b4e1bb34955d01729ee9e29bae532c06b71b1afa.zip
blt-b4e1bb34955d01729ee9e29bae532c06b71b1afa.tar.gz
blt-b4e1bb34955d01729ee9e29bae532c06b71b1afa.tar.bz2
*** empty log message ***
Diffstat (limited to 'src/bltGraph.C')
-rw-r--r--src/bltGraph.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/bltGraph.C b/src/bltGraph.C
index a2f289d..ab4eae0 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -1436,3 +1436,24 @@ void Graph::printSegments(Blt_Ps ps, Segment2d* segments, int nSegments)
}
}
+GC Graph::getPrivateGC(unsigned long gcMask, XGCValues *valuePtr)
+{
+ Pixmap pixmap = None;
+ Drawable drawable = Tk_WindowId(tkwin_);
+ Display* display = Tk_Display(tkwin_);
+ if (drawable == None)
+ drawable = RootWindow(Tk_Display(tkwin_),Tk_ScreenNumber(tkwin_));
+
+ GC gc = XCreateGC(display, drawable, gcMask, valuePtr);
+ if (pixmap != None)
+ Tk_FreePixmap(display, pixmap);
+
+ return gc;
+}
+
+void Graph::freePrivateGC(GC gc)
+{
+ Tk_FreeXId(display_, (XID)XGContextFromGC(gc));
+ XFreeGC(display_, gc);
+}
+