From 0c8e0dd208d4d0d32c72067701c76bf09b8660a9 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 21 Oct 2014 08:08:46 +0000 Subject: bring parts closer together --- Sgraph.c | 58 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'Sgraph.c') diff --git a/Sgraph.c b/Sgraph.c index d6d2b3c..33107fc 100644 --- a/Sgraph.c +++ b/Sgraph.c @@ -102,35 +102,6 @@ SgraphClassRec sgraphClassRec = { WidgetClass sgraphWidgetClass = (WidgetClass)&sgraphClassRec; -static void -GetGC(Widget w) -{ - SgraphWidget sw = (SgraphWidget)w; - XGCValues xgcv; - XtGCMask gc_mask = GCForeground; - - Trace(w); - - gc_mask = GCForeground; - xgcv.foreground = sw->core.background_pixel; - sw->sgraph.backGC = XtGetGC(w, gc_mask, &xgcv); - - gc_mask = GCForeground; - xgcv.foreground = sw->sgraph.foreground; - sw->sgraph.foreGC = XtGetGC(w, gc_mask, &xgcv); - -#if 1 - gc_mask = GCForeground|GCClipMask; - xgcv.clip_mask = sw->sgraph.mask; - sw->sgraph.clipGC = XtGetGC(w, gc_mask, &xgcv); -#endif - - gc_mask = GCForeground|GCPlaneMask; - xgcv.plane_mask = 1; - xgcv.foreground = 1; - sw->sgraph.maskGC = XtGetGC(w, gc_mask, &xgcv); -} - static void Initialize(Widget request, Widget w, ArgList args, Cardinal *nargs) { @@ -194,6 +165,35 @@ Resize(Widget w) GetGC(w); } +static void +GetGC(Widget w) +{ + SgraphWidget sw = (SgraphWidget)w; + XGCValues xgcv; + XtGCMask gc_mask = GCForeground; + + Trace(w); + + gc_mask = GCForeground; + xgcv.foreground = sw->core.background_pixel; + sw->sgraph.backGC = XtGetGC(w, gc_mask, &xgcv); + + gc_mask = GCForeground; + xgcv.foreground = sw->sgraph.foreground; + sw->sgraph.foreGC = XtGetGC(w, gc_mask, &xgcv); + +#if 1 + gc_mask = GCForeground|GCClipMask; + xgcv.clip_mask = sw->sgraph.mask; + sw->sgraph.clipGC = XtGetGC(w, gc_mask, &xgcv); +#endif + + gc_mask = GCForeground|GCPlaneMask; + xgcv.plane_mask = 1; + xgcv.foreground = 1; + sw->sgraph.maskGC = XtGetGC(w, gc_mask, &xgcv); +} + static void Redisplay(Widget w, XEvent *event, Region r) { -- cgit v1.2.3