diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-08-09 21:22:26 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-08-09 21:22:26 (GMT) |
commit | 730ace5b4591e3eee08ca979e87094a850baf476 (patch) | |
tree | 60183053c9a5be209b35ad7309c1912d39cf9f20 /tksao | |
parent | 2efe021b3cebb45967d4ff1619b27052df7c3387 (diff) | |
download | blt-730ace5b4591e3eee08ca979e87094a850baf476.zip blt-730ace5b4591e3eee08ca979e87094a850baf476.tar.gz blt-730ace5b4591e3eee08ca979e87094a850baf476.tar.bz2 |
simplify code
Diffstat (limited to 'tksao')
-rw-r--r-- | tksao/frame/base.C | 4 | ||||
-rw-r--r-- | tksao/frame/base.h | 3 | ||||
-rw-r--r-- | tksao/frame/frame3dbase.C | 10 |
3 files changed, 5 insertions, 12 deletions
diff --git a/tksao/frame/base.C b/tksao/frame/base.C index 1b19c3c..c2eba31 100644 --- a/tksao/frame/base.C +++ b/tksao/frame/base.C @@ -1376,6 +1376,7 @@ void Base::updateGCs() // widget clip region BBox bbWidget = BBox(0, 0, options->width, options->height); Vector sizeWidget = bbWidget.size(); + XRectangle rectWidget[1]; rectWidget[0].x = (int)bbWidget.ll[0]; rectWidget[0].y = (int)bbWidget.ll[1]; @@ -1385,6 +1386,7 @@ void Base::updateGCs() // window clip region BBox bbWindow = bbWidget * widgetToWindow; Vector sizeWindow = bbWindow.size(); + XRectangle rectWindow[1]; rectWindow[0].x = (int)bbWindow.ll[0]; rectWindow[0].y = (int)bbWindow.ll[1]; @@ -1814,6 +1816,7 @@ void Base::ximageToPixmapMagnifier() void Base::macosx() { // clip rect + XRectangle rectWidget[1]; XRectangle* rr = rectWidget; Vector v1 = Vector(rr->x, rr->y) * widgetToCanvas; Vector v2 = Vector(rr->x+rr->width, rr->y+rr->height) * widgetToCanvas; @@ -1922,6 +1925,7 @@ void Base::macosxPrintCmd() void Base::win32() { // clip rect + XRectangle rectWidget[1]; XRectangle* rr = rectWidget; Vector v1 = Vector(rr->x, rr->y) * widgetToCanvas; Vector v2 = Vector(rr->x+rr->width, rr->y+rr->height) * widgetToCanvas; diff --git a/tksao/frame/base.h b/tksao/frame/base.h index 4a9f9a5..158b91d 100644 --- a/tksao/frame/base.h +++ b/tksao/frame/base.h @@ -228,9 +228,6 @@ public: int useHighlite; GC highliteGC; - XRectangle rectWidget[1]; - XRectangle rectWindow[1]; - int useCrosshair; int precLinear_; diff --git a/tksao/frame/frame3dbase.C b/tksao/frame/frame3dbase.C index 411873c..21121d7 100644 --- a/tksao/frame/frame3dbase.C +++ b/tksao/frame/frame3dbase.C @@ -760,21 +760,13 @@ void Frame3dBase::updateGCs() // widget clip region BBox bbWidget = BBox(0, 0, options->width, options->height); Vector sizeWidget = bbWidget.size(); + XRectangle rectWidget[1]; rectWidget[0].x = (int)bbWidget.ll[0]; rectWidget[0].y = (int)bbWidget.ll[1]; rectWidget[0].width = (int)sizeWidget[0]; rectWidget[0].height = (int)sizeWidget[1]; - // window clip region - BBox bbWindow = bbWidget * widgetToWindow; - Vector sizeWindow = bbWindow.size(); - - rectWindow[0].x = (int)bbWindow.ll[0]; - rectWindow[0].y = (int)bbWindow.ll[1]; - rectWindow[0].width = (int)sizeWindow[0]; - rectWindow[0].height = (int)sizeWindow[1]; - // 3d highlite if (!threedGC) { threedGC = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL); |