summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-03-27 16:01:10 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-03-27 16:01:10 (GMT)
commit8a531e6830526c70e9d3d2477428bc39ed4b05ea (patch)
treecccd7183d951f9a567d591c6b9e0a72ca9395fd1
parente8be6faf948526283b914305758aece629e8d617 (diff)
downloadblt-8a531e6830526c70e9d3d2477428bc39ed4b05ea.zip
blt-8a531e6830526c70e9d3d2477428bc39ed4b05ea.tar.gz
blt-8a531e6830526c70e9d3d2477428bc39ed4b05ea.tar.bz2
grid GC
-rw-r--r--tksao/frame/base.C8
-rw-r--r--tksao/frame/base.h2
-rw-r--r--tksao/frame/grid25d.C1
-rw-r--r--tksao/frame/grid2d.C1
-rw-r--r--tksao/frame/grid3d.C1
5 files changed, 8 insertions, 5 deletions
diff --git a/tksao/frame/base.C b/tksao/frame/base.C
index 8179ee5..3bf33bc 100644
--- a/tksao/frame/base.C
+++ b/tksao/frame/base.C
@@ -150,7 +150,7 @@ Base::Base(Tcl_Interp* i, Tk_Canvas c, Tk_Item* item)
XSetForeground(display, selectGCXOR, getColor("white"));
grid = NULL;
- gridGC = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL);
+ gridGC_ = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL);
contourGC = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL);
XSetLineAttributes(display, contourGC, 1, LineSolid, CapButt, JoinMiter);
@@ -234,8 +234,8 @@ Base::~Base()
if (grid)
delete grid;
- if (gridGC)
- XFreeGC(display, gridGC);
+ if (gridGC_)
+ XFreeGC(display, gridGC_);
if (contourGC)
XFreeGC(display, contourGC);
@@ -1671,7 +1671,7 @@ void Base::updateGCs()
XSetClipRectangles(display, selectGCXOR, 0, 0, rectWindow, 1, Unsorted);
// gridGC
- XSetClipRectangles(display, gridGC, 0, 0, rectWidget, 1, Unsorted);
+ XSetClipRectangles(display, gridGC_, 0, 0, rectWidget, 1, Unsorted);
// contourGC
XSetClipRectangles(display, contourGC, 0, 0, rectWidget, 1, Unsorted);
diff --git a/tksao/frame/base.h b/tksao/frame/base.h
index 76aa468..3421536 100644
--- a/tksao/frame/base.h
+++ b/tksao/frame/base.h
@@ -260,7 +260,7 @@ public:
GC selectGCXOR; // select gc
Grid* grid;
- GC gridGC;
+ GC gridGC_;
GC contourGC;
diff --git a/tksao/frame/grid25d.C b/tksao/frame/grid25d.C
index cc9da43..e4789f8 100644
--- a/tksao/frame/grid25d.C
+++ b/tksao/frame/grid25d.C
@@ -28,6 +28,7 @@ int Grid25d::doit(RenderMode rm)
matrix_ = pp->widgetToCanvas;
pixmap_ = pp->pixmap;
+ gridGC_ = pp->gridGC_;
renderMode_ = rm;
Context* context = pp->keyContext;
diff --git a/tksao/frame/grid2d.C b/tksao/frame/grid2d.C
index 7549dea..d1813a9 100644
--- a/tksao/frame/grid2d.C
+++ b/tksao/frame/grid2d.C
@@ -28,6 +28,7 @@ int Grid2d::doit(RenderMode rm)
matrix_ = pp->widgetToCanvas;
pixmap_ = pp->pixmap;
+ gridGC_ = pp->gridGC_;
renderMode_ = rm;
Context* context = pp->keyContext;
diff --git a/tksao/frame/grid3d.C b/tksao/frame/grid3d.C
index d646418..009de90 100644
--- a/tksao/frame/grid3d.C
+++ b/tksao/frame/grid3d.C
@@ -56,6 +56,7 @@ int Grid3d::doit(RenderMode rm)
matrix_ = pp->widgetToCanvas;
pixmap_ = pp->pixmap;
+ gridGC_ = pp->gridGC_;
renderMode_ = rm;
Context* context = pp->keyContext;