From 8a531e6830526c70e9d3d2477428bc39ed4b05ea Mon Sep 17 00:00:00 2001 From: William Joye Date: Mon, 27 Mar 2017 12:01:10 -0400 Subject: grid GC --- tksao/frame/base.C | 8 ++++---- tksao/frame/base.h | 2 +- tksao/frame/grid25d.C | 1 + tksao/frame/grid2d.C | 1 + tksao/frame/grid3d.C | 1 + 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; -- cgit v0.12