52#include <X11/cursorfont.h> 
   53#include <X11/keysym.h> 
   62#   include <sys/socket.h> 
   77                               int, 
int, 
char*, 
int);
 
  146                              EnterWindowMask   | LeaveWindowMask   |
 
  147                              PointerMotionMask | KeyPressMask      |
 
  150                              EnterWindowMask | LeaveWindowMask;
 
  1560x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 
  1570x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 
  1580x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
  389      for (
Int_t i = 0; i < ncolors; i++) {
 
  399         color[i].flags = DoRed | DoGreen | DoBlue;
 
  411   unsigned int ww, hh, border, depth;
 
  412   XGetGeometry((Display*)
fDisplay, *
pix, &root, &xx, &yy, &ww, &hh, &border, &depth);
 
  512   unsigned int ww, hh, border, depth;
 
  514   XGetGeometry((Display*)
fDisplay, *
pix, &root, &xx, &yy, &ww, &hh, &border, &depth);
 
  561   int i, j, icol, ix, iy, 
w, 
h, current_icol;
 
  568   for (i = 0; i < nx; i++) {
 
  570      for (j = 0; j < ny; j++) {
 
  572         if (icol != current_icol) {
 
  591   XPoint *xyp = (XPoint*)
xy;
 
  598                   xyp, 
n, Nonconvex, CoordModeOrigin);
 
  626   XPoint *xyp = (XPoint*)
xy;
 
  628   const Int_t kMaxPoints = 1000001;
 
  630   if (
n > kMaxPoints) {
 
  632      int iend = kMaxPoints - 1;
 
  636         iend += kMaxPoints - 1;
 
  652         for (i = 1; i < 
n; i++) {
 
  653            int dx = xyp[i].x - xyp[i-1].x;
 
  654            int dy = xyp[i].y - xyp[i-1].y;
 
  655            if (dx < 0) dx = - dx;
 
  656            if (dy < 0) dy = - dy;
 
  678   XPoint *xyp = (XPoint*)
xy;
 
  681      const int kNMAX = 1000000;
 
  683      for (
int it=0;it<=nt;it++) {
 
  694      for (
m = 0; 
m < 
n; 
m++) {
 
  713               for (i = 0; i < 
gMarker.n; i++) {
 
  723               for (i = 0; i < 
gMarker.n; i++) {
 
  730               for (i = 0; i < 
gMarker.n; i += 2)
 
  785   if (((vis->c_class != TrueColor && vis->c_class != DirectColor) ||
 
  791         { 
nullptr, 0       , 0     , 24   , TrueColor  , 0       , 0         , 0        , 0            , 0 },
 
  792         { 
nullptr, 0       , 0     , 32   , TrueColor  , 0       , 0         , 0        , 0            , 0 },
 
  793         { 
nullptr, 0       , 0     , 16   , TrueColor  , 0       , 0         , 0        , 0            , 0 },
 
  794         { 
nullptr, 0       , 0     , 15   , TrueColor  , 0       , 0         , 0        , 0            , 0 },
 
  796         { 
nullptr, 0       , 0     , 24   , DirectColor, 0       , 0         , 0        , 0            , 0 },
 
  797         { 
nullptr, 0       , 0     , 32   , DirectColor, 0       , 0         , 0        , 0            , 0 },
 
  798         { 
nullptr, 0       , 0     , 16   , DirectColor, 0       , 0         , 0        , 0            , 0 },
 
  799         { 
nullptr, 0       , 0     , 15   , DirectColor, 0       , 0         , 0        , 0            , 0 },
 
  800         { 
nullptr, 0       , 0     , 0    , 0          , 0       , 0         , 0        , 0            , 0 },
 
  805      for (
Int_t i = 0; templates[i].depth != 0; i++) {
 
  806         Int_t mask = VisualScreenMask|VisualDepthMask|VisualClassMask;
 
  830      Printf(
"Selected visual 0x%lx: depth %d, class %d, colormap: %s",
 
  850   Int_t (*oldErrorHandler)(Display *, XErrorEvent *) =
 
  867         attr.colormap = XCreateColormap((Display*)
fDisplay, root, vlist[i].visual, AllocNone);
 
  870      static XColor black_xcol = { 0, 0x0000, 0x0000, 0x0000, DoRed|DoGreen|DoBlue, 0 };
 
  871      static XColor white_xcol = { 0, 0xFFFF, 0xFFFF, 0xFFFF, DoRed|DoGreen|DoBlue, 0 };
 
  872      XAllocColor((Display*)
fDisplay, 
attr.colormap, &black_xcol);
 
  873      XAllocColor((Display*)
fDisplay, 
attr.colormap, &white_xcol);
 
  874      attr.border_pixel = black_xcol.pixel;
 
  875      attr.override_redirect = True;
 
  877      w = XCreateWindow((Display*)
fDisplay, root, -20, -20, 10, 10, 0, vlist[i].depth,
 
  878                        CopyFromParent, vlist[i].visual,
 
  879                        CWColormap|CWBorderPixel|CWOverrideRedirect, &
attr);
 
  880      if (
w != None && XGetGeometry((Display*)
fDisplay, 
w, &wjunk, &junk, &junk,
 
  893   XSetErrorHandler(oldErrorHandler);
 
  933   if (which >= 
kMAXGC || which < 0) {
 
  934      Error(
"GetGC", 
"trying to get illegal GC (which = %d)", which);
 
  972      unsigned int border, depth;
 
  979                            0, 0, &
x, &
y, &junkwin);
 
  998   return XDisplayName(dpyName);
 
 1031   } 
else if (
index == 1) {
 
 1051   if (strlen(mess)==0) 
return;
 
 1093   Pixmap  pixmp1, pixmp2;
 
 1113   strlcpy(vendor, XServerVendor((Display*)
fDisplay),132);
 
 1116   for (i = 0; i < 
kMAXGC; i++)
 
 1120   if (XGetGCValues((Display*)
fDisplay, *
gGCtext, GCForeground|GCBackground, &values)) {
 
 1124      Error(
"OpenDisplay", 
"cannot get GC values");
 
 1136   if (strstr(vendor,
"Hewlett"))
 
 1137      echov.function   = GXxor;
 
 1139      echov.function   = GXinvert;
 
 1142                       GCForeground | GCBackground | GCFunction,
 
 1146   static int isdisp = 0;
 
 1149         gFont[i].id = 
nullptr;
 
 1152      fontlist = XListFonts((Display*)
fDisplay, 
"*courier*", 1, &fontcount);
 
 1153      if (fontlist && fontcount != 0) {
 
 1158         XFreeFontNames(fontlist);
 
 1161         fontlist = XListFonts((Display*)
fDisplay, 
"fixed", 1, &fontcount);
 
 1162         if (fontlist && fontcount != 0) {
 
 1167            XFreeFontNames(fontlist);
 
 1169            Warning(
"OpenDisplay", 
"no default font loaded");
 
 1206   if (
fVisual->c_class == TrueColor) {
 
 1210         if ((
fVisual->blue_mask >> i) == 1) {
 
 1218         if ((
fVisual->green_mask >> i) == 1) {
 
 1226         if ((
fVisual->red_mask >> i) == 1) {
 
 1246   unsigned int wval, hval;
 
 1248   unsigned int ww, hh, border, depth;
 
 1273   XGetGeometry((Display*)
fDisplay, 
gCws->
fWindow, &root, &xx, &yy, &ww, &hh, &border, &depth);
 
 1275   for (i = 0; i < 
kMAXGC; i++)
 
 1307   unsigned int wval, hval, border, depth;
 
 1312   XGetGeometry((Display*)
fDisplay, wind, &root, &xval, &yval, &wval, &hval, &border, &depth);
 
 1338   attr_mask |= CWBackPixel;
 
 1340   attr_mask |= CWBorderPixel;
 
 1341   attributes.event_mask = NoEventMask;
 
 1342   attr_mask |= CWEventMask;
 
 1343   attributes.backing_store = Always;
 
 1344   attr_mask |= CWBackingStore;
 
 1345   attributes.bit_gravity = NorthWestGravity;
 
 1346   attr_mask |= CWBitGravity;
 
 1349      attr_mask |= CWColormap;
 
 1353                                 xval, yval, wval, hval, 0, 
fDepth,
 
 1355                                 attr_mask, &attributes);
 
 1456   Window    root_return, child_return;
 
 1457   int       win_x_return, win_y_return;
 
 1458   int       root_x_return, root_y_return;
 
 1459   unsigned int mask_return;
 
 1462                 &child_return, &root_x_return, &root_y_return, &win_x_return,
 
 1463                 &win_y_return, &mask_return);
 
 1507   static int xloc  = 0;
 
 1508   static int yloc  = 0;
 
 1509   static int xlocp = 0;
 
 1510   static int ylocp = 0;
 
 1532   while (button_press == 0) {
 
 1548                                       (yloc-ylocp)*(yloc-ylocp)));
 
 1550                     xlocp-radius, ylocp-radius,
 
 1551                     2*radius, 2*radius, 0, 23040);
 
 1556                      xlocp, ylocp, xloc, yloc);
 
 1569      while (XEventsQueued( (Display*)
fDisplay, QueuedAlready) > 1) {
 
 1588                                           (yloc-ylocp)*(yloc-ylocp)));
 
 1590                     xlocp-radius, ylocp-radius,
 
 1591                     2*radius, 2*radius, 0, 23040);
 
 1596                      xlocp, ylocp, xloc, yloc);
 
 1609      xloc = 
event.xbutton.x;
 
 1610      yloc = 
event.xbutton.y;
 
 1612      switch (
event.type) {
 
 1618                  if (
event.type == EnterNotify) 
break;
 
 1626            button_press = 
event.xbutton.button ;
 
 1627            xlocp = 
event.xbutton.x;
 
 1628            ylocp = 
event.xbutton.y;
 
 1633         case ButtonRelease :
 
 1635               button_press = 10+
event.xbutton.button ;
 
 1636               xlocp = 
event.xbutton.x;
 
 1637               ylocp = 
event.xbutton.y;
 
 1643               button_press = 
event.xkey.keycode;
 
 1644               xlocp = 
event.xbutton.x;
 
 1645               ylocp = 
event.xbutton.y;
 
 1651               button_press = -
event.xkey.keycode;
 
 1652               xlocp = 
event.xbutton.x;
 
 1653               ylocp = 
event.xbutton.y;
 
 1662         if (button_press == 0)
 
 1667   x = 
event.xbutton.x;
 
 1668   y = 
event.xbutton.y;
 
 1670   return button_press;
 
 1692   int len_text = strlen(
text);
 
 1698      XKeyboardState kbstate;
 
 1699      cursor = XCreateFontCursor((Display*)
fDisplay, XC_question_arrow);
 
 1700      XGetKeyboardControl((Display*)
fDisplay, &kbstate);
 
 1701      percent = kbstate.bell_percent;
 
 1705   for (nt = len_text; nt > 0 && 
text[nt-1] == 
' '; nt--) { }
 
 1707   XGetInputFocus((Display*)
fDisplay, &focuswindow, &focusrevert);
 
 1719                       x + dx, 
y, 
pt < len_text ? &
text[
pt] : 
" ", 1);
 
 1721      switch (
event.type) {
 
 1727            XSetInputFocus((Display*)
fDisplay, focuswindow, focusrevert, CurrentTime);
 
 1730            nbytes = XLookupString(&
event.
xkey, keybuf, 
sizeof(keybuf),
 
 1743            if (isascii(keybuf[0]) && isprint(keybuf[0])) {
 
 1747               for (i = nt - 1; i > 
pt; i--)
 
 1749               if (
pt < len_text) {
 
 1754               switch (keybuf[0]) {
 
 1761                        for (i = 
pt; i < nt; i++)
 
 1780                        for (i = 
pt; i < nt; i++)
 
 1798                     for (i = 
pt; i < nt; i++)
 
 1824   XSetInputFocus((Display*)
fDisplay, focuswindow, focusrevert, CurrentTime);
 
 1878   unsigned int wval, hval;
 
 1880   unsigned int ww, hh, border, depth;
 
 1899   XGetGeometry((Display*)
fDisplay, 
gTws->
fWindow, &root, &xx, &yy, &ww, &hh, &border, &depth);
 
 1901   for (i = 0; i < 
kMAXGC; i++)
 
 1924   unsigned int wval=0, hval=0, border=0, depth=0;
 
 1931                &xval, &yval, &wval, &hval, &border, &depth);
 
 1932   if (wval >= 65500) wval = 1;
 
 1933   if (hval >= 65500) hval = 1;
 
 1972      for (i = 0; i < 
kMAXGC; i++)
 
 1973         XSetClipRectangles((Display*)
fDisplay, 
gGClist[i], 0, 0, ®ion, 1, YXBanded);
 
 1975      for (i = 0; i < 
kMAXGC; i++)
 
 2009   for (
int i = 0; i < 
kMAXGC; i++)
 
 2035      for (
int i = 0; i < 
kMAXGC; i++)
 
 2036         XSetClipRectangles((Display*)
fDisplay, 
gGClist[i], 0, 0, ®ion, 1, YXBanded);
 
 2054   } 
else if (!
fColormap && (ci < 0 || ci > 1)) {
 
 2060      XGetGCValues((Display*)
fDisplay, 
gc, GCBackground, &values);
 
 2067      XGetGCValues((Display*)
fDisplay, 
gc, GCForeground | GCBackground, &values);
 
 2068      if (values.foreground == values.background)
 
 2207   Int_t fasi  = fstyle%1000;
 
 2216   static int current_fasi = 0;
 
 2234         if (fasi != current_fasi) {
 
 2239            int stn = (fasi >= 1 && fasi <=25) ? fasi : 2;
 
 2245            current_fasi = fasi;
 
 2264      attr_mask = CWEventMask;
 
 2267      attributes.event_mask = NoEventMask;
 
 2268      attr_mask = CWEventMask;
 
 2325   static Int_t dashed[2] = {3,3};
 
 2326   static Int_t dotted[2] = {1,2};
 
 2327   static Int_t dasheddotted[4] = {3,4,1,4};
 
 2333      } 
else if (lstyle == 2 ) {
 
 2335      } 
else if (lstyle == 3 ) {
 
 2337      } 
else if (lstyle == 4 ) {
 
 2345         for (
Int_t j = 0; j<nt; j++) {
 
 2347            sscanf(((
TObjString*)tokens->
At(j))->GetName(), 
"%d", &it);
 
 2348            linestyle[j] = (
Int_t)(it/4);
 
 2351         delete [] linestyle;
 
 2400   if (msize < 0) 
return;
 
 2425      for (
int i = 0; i < 
gMarker.n; i++) {
 
 2445       XSetLineAttributes((Display*)
fDisplay, *
gGCmark, 0, LineSolid, CapButt, JoinMiter);
 
 2455      shape[0].x = -im;  shape[0].y = 0;
 
 2456      shape[1].x =  im;  shape[1].y = 0;
 
 2457      shape[2].x = 0  ;  shape[2].y = -im;
 
 2458      shape[3].x = 0  ;  shape[3].y = im;
 
 2462      shape[0].x = -im;  shape[0].y = 0;
 
 2463      shape[1].x =  im;  shape[1].y = 0;
 
 2464      shape[2].x = 0  ;  shape[2].y = -im;
 
 2465      shape[3].x = 0  ;  shape[3].y = im;
 
 2467      shape[4].x = -im;  shape[4].y = -im;
 
 2468      shape[5].x =  im;  shape[5].y = im;
 
 2469      shape[6].x = -im;  shape[6].y = im;
 
 2470      shape[7].x =  im;  shape[7].y = -im;
 
 2478      shape[0].x = -im;  shape[0].y = -im;
 
 2479      shape[1].x =  im;  shape[1].y = im;
 
 2480      shape[2].x = -im;  shape[2].y = im;
 
 2481      shape[3].x =  im;  shape[3].y = -im;
 
 2485      shape[0].x = -1 ;  shape[0].y = 0;
 
 2486      shape[1].x =  1 ;  shape[1].y = 0;
 
 2487      shape[2].x =  0 ;  shape[2].y = -1;
 
 2488      shape[3].x =  0 ;  shape[3].y = 1;
 
 2492      shape[0].x = -1 ;  shape[0].y = 1;
 
 2493      shape[1].x =  1 ;  shape[1].y = 1;
 
 2494      shape[2].x = -1 ;  shape[2].y = 0;
 
 2495      shape[3].x =  1 ;  shape[3].y = 0;
 
 2496      shape[4].x = -1 ;  shape[4].y = -1;
 
 2497      shape[5].x =  1 ;  shape[5].y = -1;
 
 2504      shape[0].x = -im;  shape[0].y = -im;
 
 2505      shape[1].x =  im;  shape[1].y = -im;
 
 2506      shape[2].x =  im;  shape[2].y = im;
 
 2507      shape[3].x = -im;  shape[3].y = im;
 
 2508      shape[4].x = -im;  shape[4].y = -im;
 
 2512      shape[0].x = -im;  shape[0].y = im;
 
 2513      shape[1].x =  im;  shape[1].y = im;
 
 2514      shape[2].x =   0;  shape[2].y = -im;
 
 2515      shape[3].x = -im;  shape[3].y = im;
 
 2519      shape[0].x =   0;  shape[0].y = im;
 
 2520      shape[1].x =  im;  shape[1].y = -im;
 
 2521      shape[2].x = -im;  shape[2].y = -im;
 
 2522      shape[3].x =   0;  shape[3].y = im;
 
 2526      shape[0].x = -im;  shape[0].y = -im;
 
 2527      shape[1].x =  im;  shape[1].y = -im;
 
 2528      shape[2].x =  im;  shape[2].y = im;
 
 2529      shape[3].x = -im;  shape[3].y = im;
 
 2530      shape[4].x = -im;  shape[4].y = -im;
 
 2534      shape[0].x = -im;  shape[0].y = im;
 
 2535      shape[1].x =  im;  shape[1].y = im;
 
 2536      shape[2].x =   0;  shape[2].y = -im;
 
 2537      shape[3].x = -im;  shape[3].y = im;
 
 2541      Int_t imx = 
Int_t(2.66*MarkerSizeReduced + 0.5);
 
 2542      shape[0].x =-imx;  shape[0].y = 0;
 
 2543      shape[1].x =   0;  shape[1].y = -im;
 
 2544      shape[2].x = imx;  shape[2].y = 0;
 
 2545      shape[3].x =   0;  shape[3].y = im;
 
 2546      shape[4].x =-imx;  shape[4].y = 0;
 
 2550      Int_t imx = 
Int_t(1.33*MarkerSizeReduced + 0.5);
 
 2551      shape[0].x = -im;  shape[0].y =-imx;
 
 2552      shape[1].x =-imx;  shape[1].y =-imx;
 
 2553      shape[2].x =-imx;  shape[2].y = -im;
 
 2554      shape[3].x = imx;  shape[3].y = -im;
 
 2555      shape[4].x = imx;  shape[4].y =-imx;
 
 2556      shape[5].x =  im;  shape[5].y =-imx;
 
 2557      shape[6].x =  im;  shape[6].y = imx;
 
 2558      shape[7].x = imx;  shape[7].y = imx;
 
 2559      shape[8].x = imx;  shape[8].y = im;
 
 2560      shape[9].x =-imx;  shape[9].y = im;
 
 2561      shape[10].x=-imx;  shape[10].y= imx;
 
 2562      shape[11].x= -im;  shape[11].y= imx;
 
 2563      shape[12].x= -im;  shape[12].y=-imx;
 
 2567      Int_t im1 = 
Int_t(0.66*MarkerSizeReduced + 0.5);
 
 2568      Int_t im2 = 
Int_t(2.00*MarkerSizeReduced + 0.5);
 
 2569      Int_t im3 = 
Int_t(2.66*MarkerSizeReduced + 0.5);
 
 2570      Int_t im4 = 
Int_t(1.33*MarkerSizeReduced + 0.5);
 
 2571      shape[0].x = -im;  shape[0].y = im4;
 
 2572      shape[1].x =-im2;  shape[1].y =-im1;
 
 2573      shape[2].x =-im3;  shape[2].y = -im;
 
 2574      shape[3].x =   0;  shape[3].y =-im2;
 
 2575      shape[4].x = im3;  shape[4].y = -im;
 
 2576      shape[5].x = im2;  shape[5].y =-im1;
 
 2577      shape[6].x =  im;  shape[6].y = im4;
 
 2578      shape[7].x = im4;  shape[7].y = im4;
 
 2579      shape[8].x =   0;  shape[8].y = im;
 
 2580      shape[9].x =-im4;  shape[9].y = im4;
 
 2581      shape[10].x= -im;  shape[10].y= im4;
 
 2585      Int_t im1 = 
Int_t(0.66*MarkerSizeReduced + 0.5);
 
 2586      Int_t im2 = 
Int_t(2.00*MarkerSizeReduced + 0.5);
 
 2587      Int_t im3 = 
Int_t(2.66*MarkerSizeReduced + 0.5);
 
 2588      Int_t im4 = 
Int_t(1.33*MarkerSizeReduced + 0.5);
 
 2589      shape[0].x = -im;  shape[0].y = im4;
 
 2590      shape[1].x =-im2;  shape[1].y =-im1;
 
 2591      shape[2].x =-im3;  shape[2].y = -im;
 
 2592      shape[3].x =   0;  shape[3].y =-im2;
 
 2593      shape[4].x = im3;  shape[4].y = -im;
 
 2594      shape[5].x = im2;  shape[5].y =-im1;
 
 2595      shape[6].x =  im;  shape[6].y = im4;
 
 2596      shape[7].x = im4;  shape[7].y = im4;
 
 2597      shape[8].x =   0;  shape[8].y = im;
 
 2598      shape[9].x =-im4;  shape[9].y = im4;
 
 2599      shape[10].x= -im;  shape[10].y= im4;
 
 2603      shape[0].x =   0;  shape[0].y = im;
 
 2604      shape[1].x =  im;  shape[1].y = -im;
 
 2605      shape[2].x = -im;  shape[2].y = -im;
 
 2606      shape[3].x =   0;  shape[3].y = im;
 
 2610      Int_t imx = 
Int_t(2.66*MarkerSizeReduced + 0.5);
 
 2611      shape[0].x =-imx;  shape[0].y = 0;
 
 2612      shape[1].x =   0;  shape[1].y = -im;
 
 2613      shape[2].x = imx;  shape[2].y = 0;
 
 2614      shape[3].x =   0;  shape[3].y = im;
 
 2615      shape[4].x =-imx;  shape[4].y = 0;
 
 2619      Int_t imx = 
Int_t(1.33*MarkerSizeReduced + 0.5);
 
 2620      shape[0].x = -im;  shape[0].y =-imx;
 
 2621      shape[1].x =-imx;  shape[1].y =-imx;
 
 2622      shape[2].x =-imx;  shape[2].y = -im;
 
 2623      shape[3].x = imx;  shape[3].y = -im;
 
 2624      shape[4].x = imx;  shape[4].y =-imx;
 
 2625      shape[5].x =  im;  shape[5].y =-imx;
 
 2626      shape[6].x =  im;  shape[6].y = imx;
 
 2627      shape[7].x = imx;  shape[7].y = imx;
 
 2628      shape[8].x = imx;  shape[8].y = im;
 
 2629      shape[9].x =-imx;  shape[9].y = im;
 
 2630      shape[10].x=-imx;  shape[10].y= imx;
 
 2631      shape[11].x= -im;  shape[11].y= imx;
 
 2632      shape[12].x= -im;  shape[12].y=-imx;
 
 2636      shape[0].x =-im;  shape[0].y = 0;
 
 2637      shape[1].x =  0;  shape[1].y = -im;
 
 2638      shape[2].x = im;  shape[2].y = 0;
 
 2639      shape[3].x =  0;  shape[3].y = im;
 
 2640      shape[4].x =-im;  shape[4].y = 0;
 
 2641      shape[5].x = im;  shape[5].y = 0;
 
 2642      shape[6].x =  0;  shape[6].y = im;
 
 2643      shape[7].x =  0;  shape[7].y =-im;
 
 2647      shape[0].x = -im;  shape[0].y = -im;
 
 2648      shape[1].x =  im;  shape[1].y = -im;
 
 2649      shape[2].x =  im;  shape[2].y = im;
 
 2650      shape[3].x = -im;  shape[3].y = im;
 
 2651      shape[4].x = -im;  shape[4].y = -im;
 
 2652      shape[5].x =  im;  shape[5].y = im;
 
 2653      shape[6].x = -im;  shape[6].y = im;
 
 2654      shape[7].x =  im;  shape[7].y = -im;
 
 2658      Int_t im2 = 
Int_t(2.0*MarkerSizeReduced + 0.5);
 
 2659      shape[0].x =   0;  shape[0].y =   0;
 
 2660      shape[1].x =-im2;  shape[1].y =  im;
 
 2661      shape[2].x = im2;  shape[2].y =  im;
 
 2662      shape[3].x =   0;  shape[3].y =   0;
 
 2663      shape[4].x =-im2;  shape[4].y = -im;
 
 2664      shape[5].x = -im;  shape[5].y =   0;
 
 2665      shape[6].x =   0;  shape[6].y =   0;
 
 2666      shape[7].x =  im;  shape[7].y =   0;
 
 2667      shape[8].x = im2;  shape[8].y =  -im;
 
 2668      shape[9].x =   0;  shape[9].y =   0;
 
 2672      Int_t im2 = 
Int_t(2.0*MarkerSizeReduced + 0.5);
 
 2673      shape[0].x = -im;  shape[0].y = 0;
 
 2674      shape[1].x = -im;  shape[1].y =-im2;
 
 2675      shape[2].x =-im2;  shape[2].y = -im;
 
 2676      shape[3].x = im2;  shape[3].y = -im;
 
 2677      shape[4].x =  im;  shape[4].y =-im2;
 
 2678      shape[5].x =  im;  shape[5].y = im2;
 
 2679      shape[6].x = im2;  shape[6].y = im;
 
 2680      shape[7].x =-im2;  shape[7].y = im;
 
 2681      shape[8].x = -im;  shape[8].y = im2;
 
 2682      shape[9].x = -im;  shape[9].y = 0;
 
 2683      shape[10].x = im;  shape[10].y = 0;
 
 2684      shape[11].x =  0;  shape[11].y = 0;
 
 2685      shape[12].x =  0;  shape[12].y = -im;
 
 2686      shape[13].x =  0;  shape[13].y = im;
 
 2687      shape[14].x =  0;  shape[14].y = 0;
 
 2691      Int_t im2 = 
Int_t(2.0*MarkerSizeReduced + 0.5);
 
 2692      shape[0].x =   0;  shape[0].y =   0;
 
 2693      shape[1].x =-im2;  shape[1].y =  im;
 
 2694      shape[2].x = im2;  shape[2].y =  im;
 
 2695      shape[3].x =   0;  shape[3].y =   0;
 
 2696      shape[4].x =-im2;  shape[4].y = -im;
 
 2697      shape[5].x = -im;  shape[5].y =   0;
 
 2698      shape[6].x =   0;  shape[6].y =   0;
 
 2699      shape[7].x =  im;  shape[7].y =   0;
 
 2700      shape[8].x = im2;  shape[8].y =  -im;
 
 2704      Int_t im2 = 
Int_t(2.0*MarkerSizeReduced + 0.5);
 
 2705      shape[0].x =     0;  shape[0].y =    0;
 
 2706      shape[1].x =   im2;  shape[1].y =   im;
 
 2707      shape[2].x =    im;  shape[2].y =  im2;
 
 2708      shape[3].x =     0;  shape[3].y =    0;
 
 2709      shape[4].x =    im;  shape[4].y = -im2;
 
 2710      shape[5].x =   im2;  shape[5].y =  -im;
 
 2711      shape[6].x =     0;  shape[6].y =    0;
 
 2712      shape[7].x =  -im2;  shape[7].y =  -im;
 
 2713      shape[8].x =   -im;  shape[8].y = -im2;
 
 2714      shape[9].x =     0;  shape[9].y =    0;
 
 2715      shape[10].x =   -im;  shape[10].y =  im2;
 
 2716      shape[11].x =  -im2;  shape[11].y =   im;
 
 2717      shape[12].x =     0;  shape[12].y =  0;
 
 2721      Int_t im2 = 
Int_t(2.0*MarkerSizeReduced + 0.5);
 
 2722      shape[0].x =     0;  shape[0].y =    0;
 
 2723      shape[1].x =   im2;  shape[1].y =   im;
 
 2724      shape[2].x =    im;  shape[2].y =  im2;
 
 2725      shape[3].x =     0;  shape[3].y =    0;
 
 2726      shape[4].x =    im;  shape[4].y = -im2;
 
 2727      shape[5].x =   im2;  shape[5].y =  -im;
 
 2728      shape[6].x =     0;  shape[6].y =    0;
 
 2729      shape[7].x =  -im2;  shape[7].y =  -im;
 
 2730      shape[8].x =   -im;  shape[8].y = -im2;
 
 2731      shape[9].x =     0;  shape[9].y =    0;
 
 2732      shape[10].x =   -im;  shape[10].y =  im2;
 
 2733      shape[11].x =  -im2;  shape[11].y =   im;
 
 2734      shape[12].x =     0;  shape[12].y =  0;
 
 2739      shape[0].x=     0;   shape[0].y= im;
 
 2740      shape[1].x=  -imx;   shape[1].y= imx;
 
 2741      shape[2].x  = -im;   shape[2].y = 0;
 
 2742      shape[3].x = -imx;   shape[3].y = -imx;
 
 2743      shape[4].x =    0;   shape[4].y = -im;
 
 2744      shape[5].x =  imx;   shape[5].y = -imx;
 
 2745      shape[6].x =   im;   shape[6].y = 0;
 
 2746      shape[7].x=   imx;   shape[7].y= imx;
 
 2747      shape[8].x=     0;   shape[8].y= im;
 
 2752      shape[0].x =    0;   shape[0].y =   im;
 
 2753      shape[1].x = -imx;   shape[1].y =  imx;
 
 2754      shape[2].x =  -im;   shape[2].y =    0;
 
 2755      shape[3].x = -imx;   shape[3].y = -imx;
 
 2756      shape[4].x =    0;   shape[4].y =  -im;
 
 2757      shape[5].x =  imx;   shape[5].y = -imx;
 
 2758      shape[6].x =   im;   shape[6].y =    0;
 
 2759      shape[7].x =  imx;   shape[7].y =  imx;
 
 2760      shape[8].x =    0;   shape[8].y =   im;
 
 2764      Int_t im2 = 
Int_t(2.0*MarkerSizeReduced + 0.5);
 
 2765      shape[0].x =    0;  shape[0].y =    0;
 
 2766      shape[1].x =  im2;  shape[1].y =   im;
 
 2767      shape[2].x = -im2;  shape[2].y =   im;
 
 2768      shape[3].x =  im2;  shape[3].y =  -im;
 
 2769      shape[4].x = -im2;  shape[4].y =  -im;
 
 2770      shape[5].x =    0;  shape[5].y =    0;
 
 2771      shape[6].x =   im;  shape[6].y =  im2;
 
 2772      shape[7].x =   im;  shape[7].y = -im2;
 
 2773      shape[8].x =  -im;  shape[8].y =  im2;
 
 2774      shape[9].x =  -im;  shape[9].y = -im2;
 
 2775      shape[10].x =    0;  shape[10].y =    0;
 
 2779      Int_t im0 = 
Int_t(0.4*MarkerSizeReduced + 0.5);
 
 2780      Int_t im2 = 
Int_t(2.0*MarkerSizeReduced + 0.5);
 
 2781      shape[0].x =  im0;  shape[0].y =  im0;
 
 2782      shape[1].x =  im2;  shape[1].y =   im;
 
 2783      shape[2].x = -im2;  shape[2].y =   im;
 
 2784      shape[3].x = -im0;  shape[3].y =  im0;
 
 2785      shape[4].x =  -im;  shape[4].y =  im2;
 
 2786      shape[5].x =  -im;  shape[5].y = -im2;
 
 2787      shape[6].x = -im0;  shape[6].y = -im0;
 
 2788      shape[7].x = -im2;  shape[7].y =  -im;
 
 2789      shape[8].x =  im2;  shape[8].y =  -im;
 
 2790      shape[9].x =  im0;  shape[9].y = -im0;
 
 2791      shape[10].x =   im;  shape[10].y = -im2;
 
 2792      shape[11].x =   im;  shape[11].y =  im2;
 
 2793      shape[12].x =  im0;  shape[12].y =  im0;
 
 2797      Int_t im2 = 
Int_t(2.0*MarkerSizeReduced + 0.5);
 
 2798      shape[0].x =    0;  shape[0].y =  im2;
 
 2799      shape[1].x = -im2;  shape[1].y =   im;
 
 2800      shape[2].x =  -im;  shape[2].y =  im2;
 
 2801      shape[3].x = -im2;  shape[3].y =    0;
 
 2802      shape[4].x =  -im;  shape[4].y = -im2;
 
 2803      shape[5].x = -im2;  shape[5].y =  -im;
 
 2804      shape[6].x =    0;  shape[6].y = -im2;
 
 2805      shape[7].x =  im2;  shape[7].y =  -im;
 
 2806      shape[8].x =   im;  shape[8].y = -im2;
 
 2807      shape[9].x =  im2;  shape[9].y =    0;
 
 2808      shape[10].x =  im;  shape[10].y = im2;
 
 2809      shape[11].x = im2;  shape[11].y =  im;
 
 2810      shape[12].x =   0;  shape[12].y = im2;
 
 2814      Int_t im2 = 
Int_t(2.0*MarkerSizeReduced + 0.5);
 
 2815      shape[0].x =    0;  shape[0].y =  im2;
 
 2816      shape[1].x = -im2;  shape[1].y =   im;
 
 2817      shape[2].x =  -im;  shape[2].y =  im2;
 
 2818      shape[3].x = -im2;  shape[3].y =    0;
 
 2819      shape[4].x =  -im;  shape[4].y = -im2;
 
 2820      shape[5].x = -im2;  shape[5].y =  -im;
 
 2821      shape[6].x =    0;  shape[6].y = -im2;
 
 2822      shape[7].x =  im2;  shape[7].y =  -im;
 
 2823      shape[8].x =   im;  shape[8].y = -im2;
 
 2824      shape[9].x =  im2;  shape[9].y =    0;
 
 2825      shape[10].x =  im;  shape[10].y = im2;
 
 2826      shape[11].x = im2;  shape[11].y =  im;
 
 2827      shape[12].x =   0;  shape[12].y = im2;
 
 2831      Int_t im2 = 
Int_t(2.0*MarkerSizeReduced + 0.5);
 
 2832      shape[0].x =    0;  shape[0].y =  im2*1.005;
 
 2833      shape[1].x = -im2;  shape[1].y =   im;
 
 2834      shape[2].x =  -im;  shape[2].y =  im2;
 
 2835      shape[3].x = -im2;  shape[3].y =    0;
 
 2836      shape[4].x =  -im;  shape[4].y = -im2;
 
 2837      shape[5].x = -im2;  shape[5].y =  -im;
 
 2838      shape[6].x =    0;  shape[6].y = -im2;
 
 2839      shape[7].x =  im2;  shape[7].y =  -im;
 
 2840      shape[8].x =   im;  shape[8].y = -im2;
 
 2841      shape[9].x =  im2;  shape[9].y =    0;
 
 2842      shape[10].x =  im;  shape[10].y = im2;
 
 2843      shape[11].x = im2;  shape[11].y =  im;
 
 2844      shape[12].x =   0;  shape[12].y = im2*0.995;
 
 2845      shape[13].x =  im2*0.995;  shape[13].y =    0;
 
 2846      shape[14].x =    0;  shape[14].y = -im2*0.995;
 
 2847      shape[15].x = -im2*0.995;  shape[15].y =    0;
 
 2848      shape[16].x =    0;  shape[16].y =  im2*0.995;
 
 2852      Int_t imx = 
Int_t(1.33*MarkerSizeReduced + 0.5);
 
 2853      shape[0].x =-imx;  shape[0].y =-imx*1.005;
 
 2854      shape[1].x =-imx;  shape[1].y = -im;
 
 2855      shape[2].x = imx;  shape[2].y = -im;
 
 2856      shape[3].x = imx;  shape[3].y =-imx;
 
 2857      shape[4].x =  im;  shape[4].y =-imx;
 
 2858      shape[5].x =  im;  shape[5].y = imx;
 
 2859      shape[6].x = imx;  shape[6].y = imx;
 
 2860      shape[7].x = imx;  shape[7].y = im;
 
 2861      shape[8].x =-imx;  shape[8].y = im;
 
 2862      shape[9].x =-imx;  shape[9].y = imx;
 
 2863      shape[10].x = -im;  shape[10].y = imx;
 
 2864      shape[11].x = -im;  shape[11].y =-imx;
 
 2865      shape[12].x =-imx;  shape[12].y =-imx*0.995;
 
 2866      shape[13].x =-imx;  shape[13].y = imx;
 
 2867      shape[14].x = imx;  shape[14].y = imx;
 
 2868      shape[15].x = imx;  shape[15].y =-imx;
 
 2869      shape[16].x =-imx;  shape[16].y =-imx*1.005;
 
 2890   ULong_t *orgcolors = 
nullptr, *tmpc = 
nullptr;
 
 2891   Int_t    maxcolors = 0, ncolors = 0, ntmpc = 0;
 
 2912      XDestroyImage(image);
 
 2913      ::operator 
delete(orgcolors);
 
 2942   XDestroyImage(image);
 
 2943   ::operator 
delete(orgcolors);
 
 2952   if (maxcolors == 0) {
 
 2955      orgcolors = (
ULong_t*) ::operator 
new(maxcolors*
sizeof(
ULong_t));
 
 2958   for (
int i = 0; i < ncolors; i++)
 
 2959      if (
pixel == orgcolors[i]) 
return;
 
 2961   if (ncolors >= maxcolors) {
 
 2967   orgcolors[ncolors++] = 
pixel;
 
 2976   if (ncolors == 0) 
return;
 
 2981   for (i = 0; i < ncolors; i++) {
 
 2982      xcol[i].pixel = orgcolors[i];
 
 2983      xcol[i].red   = xcol[i].green = xcol[i].blue = 0;
 
 2984      xcol[i].flags = DoRed | DoGreen | DoBlue;
 
 2991   for (i = 0; i < ncolors; i++) {
 
 2992      val = xcol[i].red + add;
 
 2995      val = xcol[i].green + add;
 
 2998      val = xcol[i].blue + add;
 
 3002         Warning(
"MakeOpaqueColors", 
"failed to allocate color %hd, %hd, %hd",
 
 3003                 xcol[i].red, xcol[i].green, xcol[i].blue);
 
 3010   for (i = 0; i < ncolors; i++)
 
 3021   for (
int i = 0; i < ncolors; i++)
 
 3022      if (
pixel == orgcolors[i]) 
return i;
 
 3024   Error(
"FindColor", 
"did not find color, should never happen!");
 
 3042      xcol.flags = DoRed | DoGreen | DoBlue;
 
 3046         if (col.
fRed  == xcol.red && col.
fGreen == xcol.green &&
 
 3047             col.
fBlue == xcol.blue)
 
 3056         col.
fRed     = xcol.red;
 
 3058         col.
fBlue    = xcol.blue;
 
 3070   Int_t txalh = talign/10;
 
 3071   Int_t txalv = talign%10;
 
 3134   if (XGetGCValues((Display*)
fDisplay, *
gGCtext, GCForeground | GCBackground, &values)) {
 
 3138      Error(
"SetTextColor", 
"cannot get GC values");
 
 3173   if (fontlist && fontcount != 0) {
 
 3185      XFreeFontNames(fontlist);
 
 3220         XSynchronize((Display*)
fDisplay,1);
 
 3224         XSynchronize((Display*)
fDisplay,0);
 
 3267      XWarpPointer((Display*)
fDisplay, None, (
Window) 
id, 0, 0, 0, 0, ix, iy);
 
 3280   unsigned int wval, hval;
 
 3300                  void (*get_scline) (
int, 
int, 
Byte_t *), 
void (*pb)(
Byte_t));
 
 3302   int GIFinfo(
Byte_t *gifArr, 
int *Width, 
int *Height, 
int *Ncols);
 
 3310   for (
int i = 0; i < 
width; i++)
 
 3334   Int_t    maxcolors = 0, ncolors = 0;
 
 3349   for (i = 0; i < ncolors; i++) {
 
 3350      xcol[i].pixel = orgcolors[i];
 
 3351      xcol[i].red   = xcol[i].green = xcol[i].blue = 0;
 
 3352      xcol[i].flags = DoRed | DoGreen | DoBlue;
 
 3360   B = 
new Int_t[ncolors];
 
 3362   for (i = 0; i < ncolors; i++) {
 
 3364      G[i] = xcol[i].green;
 
 3365      B[i] = xcol[i].blue;
 
 3374         XPutPixel(image, 
x, 
y, idx);
 
 3380   ::operator 
delete(orgcolors);
 
 3389   Byte_t    scline[2000], 
r[256], 
b[256], 
g[256];
 
 3390   Int_t    *red, *green, *blue;
 
 3391   Int_t     ncol, maxcol, i;
 
 3400                       AllPlanes, ZPixmap);
 
 3406      Error(
"WriteGIF", 
"Cannot create GIF of image containing more than 256 colors. Try in batch mode.");
 
 3414   for (i = 0; i < ncol; i++) {
 
 3415      if (maxcol < red[i] )   maxcol = red[i];
 
 3416      if (maxcol < green[i] ) maxcol = green[i];
 
 3417      if (maxcol < blue[i] )  maxcol = blue[i];
 
 3423      for (i = 0; i < ncol; i++) {
 
 3424         r[i] = red[i] * 255/maxcol;
 
 3425         g[i] = green[i] * 255/maxcol;
 
 3426         b[i] = blue[i] * 255/maxcol;
 
 3438      Error(
"WriteGIF",
"cannot write file: %s",
name);
 
 3453   const int maxSegment = 20;
 
 3455   unsigned char *jimg, *jbase, icol;
 
 3457   XSegment      lines[256][maxSegment];
 
 3466   for (i = 0; i < 256; i++) nlines[i] = 0;
 
 3470   jbase = image + (
ymin-1)*nx + 
xmin;
 
 3473      xcur = 
x1; jbase += nx;
 
 3474      for (jimg = jbase, icol = *jimg++, 
x = 
x1+1; 
x <= 
x2; jimg++, 
x++) {
 
 3475         if (icol != *jimg) {
 
 3476            if (icol != itran) {
 
 3478               lines[icol][
n].x1 = xcur; lines[icol][
n].y1 = 
y;
 
 3479               lines[icol][
n].x2 = 
x-1;  lines[icol][
n].y2 = 
y;
 
 3480               if (nlines[icol] == maxSegment) {
 
 3487            icol = *jimg; xcur = 
x;
 
 3490      if (icol != itran) {
 
 3492         lines[icol][
n].x1 = xcur; lines[icol][
n].y1 = 
y;
 
 3493         lines[icol][
n].x2 = 
x-1;  lines[icol][
n].y2 = 
y;
 
 3494         if (nlines[icol] == maxSegment) {
 
 3503   for (i = 0; i < 256; i++) {
 
 3504      if (nlines[i] != 0) {
 
 3519   unsigned char *gifArr, *pixArr, red[256], green[256], blue[256], *j1, *j2, icol;
 
 3524   fd = fopen(
file, 
"r");
 
 3526      Error(
"ReadGIF", 
"unable to open GIF file");
 
 3531   long ft = ftell(fd);
 
 3533      Error(
"ReadGIF", 
"unable to open GIF file");
 
 3541   if (!(gifArr = (
unsigned char *) 
calloc(filesize+256,1))) {
 
 3542      Error(
"ReadGIF", 
"unable to allocate array for gif");
 
 3547   if (fread(gifArr, filesize, 1, fd) != 1) {
 
 3548      Error(
"ReadGIF", 
"GIF file read failed");
 
 3562      Error(
"ReadGIF", 
"unable to allocate array for image");
 
 3578   for (i = 0; i < ncolor; i++) {
 
 3588   for (i = 1; i <= 
height/2; i++) {
 
 3589      j1 = pixArr + (i-1)*
width;
 
 3591      for (k = 0; k < 
width; k++) {
 
 3592         icol = *j1; *j1++ = *j2; *j2++ = icol;
 
 3596   PutImage(
offset,-1,x0,y0,
width,
height,0,0,
width-1,
height-1,pixArr,pic);
 
 3694   Int_t major_opcode, first_event, first_error;
 
 3697   return XQueryExtension((Display*)
fDisplay, ext, &major_opcode, &first_event, &first_error);
 
Handle_t Pixmap_t
Pixmap handle.
 
Handle_t Window_t
Window handle.
 
Handle_t Drawable_t
Drawable handle.
 
const unsigned char gStipples[26][32]
 
int XRotDrawAlignedImageString(Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
A front end to XRotPaintAlignedString: -does alignment, paints background.
 
int XRotDrawAlignedString(Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
A front end to XRotPaintAlignedString: -does alignment, no background.
 
XPoint * XRotTextExtents(Display *, XFontStruct *, float, int, int, char *, int)
Calculate the bounding box some text will have when painted.
 
void XRotSetMagnification(float)
Set the font magnification factor for all subsequent operations.
 
constexpr ULong_t kBitsPerByte
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void pix
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void chupy
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t cursor
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void cmap
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void pixel
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height qwid
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
 
Option_t Option_t fontnumber
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
 
Option_t Option_t markerstyle
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void chupx
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text CreatePixmap
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char pxname
 
Option_t Option_t TPoint TPoint const char x2
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t nitems
 
Option_t Option_t TPoint TPoint const char x1
 
Option_t Option_t textsize
 
Option_t Option_t TPoint TPoint angle
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t win
 
Option_t Option_t TPoint xy
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void xpos
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
 
Option_t Option_t TPoint TPoint const char mode
 
Option_t Option_t TPoint TPoint const char y2
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char fontname
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void ypos
 
Option_t Option_t SetMarkerStyle
 
Option_t Option_t TPoint TPoint percent
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
 
Option_t Option_t TPoint TPoint const char text
 
Option_t Option_t TPoint TPoint const char y1
 
static void PutByte(Byte_t b)
Put byte b in output stream.
 
XPoint * XRotTextExtents(Display *, XFontStruct *, float, int, int, char *, int)
Calculate the bounding box some text will have when painted.
 
static int gMarkerJoinStyle
 
static int gMarkerLineStyle
 
float XRotVersion(char *, int)
Return version/copyright information.
 
int GIFquantize(UInt_t width, UInt_t height, Int_t *ncol, Byte_t *red, Byte_t *green, Byte_t *blue, Byte_t *outputBuf, Byte_t *outputCmap)
 
static ULong_t gKeybdMask
 
void XRotSetMagnification(float)
Set the font magnification factor for all subsequent operations.
 
static struct @56 gFont[kMAXFONT]
 
static void GetPixel(int y, int width, Byte_t *scline)
Get pixels in line y and put in array scline.
 
static Pixmap gFillPattern
 
static Cursor gNullCursor
 
static struct @57 gMarker
 
int GIFdecode(Byte_t *gifArr, Byte_t *pixArr, int *Width, int *Height, int *Ncols, Byte_t *R, Byte_t *G, Byte_t *B)
 
const char null_cursor_bits[]
 
int XRotDrawString(Display *, XFontStruct *, float, Drawable, GC, int, int, char *)
A front end to XRotPaintAlignedString: -no alignment, no background.
 
static char gDashList[10]
 
const Int_t kBIGGEST_RGB_VALUE
 
static void PutByte(Byte_t b)
Put byte b in output stream.
 
long GIFencode(int Width, int Height, Int_t Ncol, Byte_t R[], Byte_t G[], Byte_t B[], Byte_t ScLine[], void(*get_scline)(int, int, Byte_t *), void(*pb)(Byte_t))
 
int XRotDrawAlignedImageString(Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
A front end to XRotPaintAlignedString: -does alignment, paints background.
 
static ULong_t gMouseMask
 
static Int_t gCurrentFontNumber
 
static GC gGClist[kMAXGC]
 
static int gMarkerLineWidth
 
int XRotDrawAlignedString(Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
A front end to XRotPaintAlignedString: -does alignment, no background.
 
int XRotDrawImageString(Display *, XFontStruct *, float, Drawable, GC, int, int, char *)
A front end to XRotPaintAlignedString: -no alignment, paints background.
 
static int gMarkerCapStyle
 
static XFontStruct * gTextFont
 
void XRotSetBoundingBoxPad(int)
Set the padding used when calculating bounding boxes.
 
static Int_t DummyX11ErrorHandler(Display *, XErrorEvent *)
Dummy error handler for X11. Used by FindUsableVisual().
 
int GIFinfo(Byte_t *gifArr, int *Width, int *Height, int *Ncols)
 
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
 
R__EXTERN TStyle * gStyle
 
virtual Color_t GetFillColor() const
Return the fill area color.
 
Style_t fFillStyle
Fill area style.
 
Color_t fFillColor
Fill area color.
 
Width_t fLineWidth
Line width.
 
virtual void SetLineColor(Color_t lcolor)
Set the line color.
 
Style_t fLineStyle
Line style.
 
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
 
static Width_t GetMarkerLineWidth(Style_t style)
Internal helper function that returns the line width of the given marker style (0 = filled marker)
 
Size_t fMarkerSize
Marker size.
 
Style_t fMarkerStyle
Marker style.
 
static Style_t GetMarkerStyleBase(Style_t style)
Internal helper function that returns the corresponding marker style with line width 1 for the given ...
 
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
 
Float_t fTextAngle
Text angle.
 
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
 
Font_t fTextFont
Text font.
 
Float_t fTextSize
Text size.
 
The color creation and management class.
 
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
 
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
 
Bool_t Next(ULong64_t &hash, Long64_t &key, Long64_t &value)
Get next entry from TExMap. Returns kFALSE at end of map.
 
This class stores a (key,value) pair using an external hash.
 
void Add(ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table. The key should be unique.
 
Long64_t GetValue(ULong64_t hash, Long64_t key)
Return the value belonging to specified key and hash value.
 
This class is the basic interface to the X11 (Xlib) graphics system.
 
void DrawFillArea(Int_t n, TPoint *xy) override
Fill area described by polygon.
 
void * fDisplay
Pointer to display.
 
void MakeOpaqueColors(Int_t percent, ULong_t *orgcolors, Int_t ncolors)
Get RGB values for orgcolors, add percent neutral to the RGB and allocate fNewColors.
 
void SetLineColor(Color_t cindex) override
Set color index for lines.
 
void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override
Return position and size of window wid.
 
Colormap fColormap
Default colormap, 0 if b/w.
 
Window_t GetWindowID(Int_t wid) override
Return the X11 window identifier.
 
Int_t WriteGIF(char *name) override
Writes the current window into GIF file.
 
void SetFillColor(Color_t cindex) override
Set color index for fill areas.
 
void ResizeWindow(Int_t wid) override
Resize the current window if necessary.
 
void SetTextAlign(Short_t talign=11) override
Set text alignment.
 
void RescaleWindow(Int_t wid, UInt_t w, UInt_t h) override
Rescale the window wid.
 
void SetCursor(Int_t win, ECursor cursor) override
Set the cursor.
 
Int_t fScreenNumber
Screen number.
 
void Sync(Int_t mode) override
Set synchronisation on or off.
 
Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height) override
create pixmap from RGB data.
 
unsigned char * GetColorBits(Drawable_t wid, Int_t x=0, Int_t y=0, UInt_t w=0, UInt_t h=0) override
Returns an array of pixels created from a part of drawable (defined by x, y, w, h) in format: b1,...
 
void CollectImageColors(ULong_t pixel, ULong_t *&orgcolors, Int_t &ncolors, Int_t &maxcolors)
Collect in orgcolors all different original image colors.
 
ULong_t fWhitePixel
Value of white pixel in colormap.
 
Cursor fCursors[kNumCursors]
List of cursors.
 
Bool_t AllocColor(Colormap cmap, RXColor *color)
Allocate color in colormap.
 
Int_t fTextAlignV
Text Alignment Vertical.
 
void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode) override
Draw a text string using current font.
 
void QueryColors(Colormap cmap, RXColor *colors, Int_t ncolors)
Returns the current RGB value for the pixel in the XColor structure.
 
Int_t fBlueShift
Bits to left shift blue.
 
void SetMarkerColor(Color_t cindex) override
Set color index for markers.
 
void Warp(Int_t ix, Int_t iy, Window_t id=0) override
Set pointer position.
 
void * GetGC(Int_t which) const
Return desired Graphics Context ("which" maps directly on gGCList[]).
 
void SetClipOFF(Int_t wid) override
Turn off the clipping for the window wid.
 
Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h) override
Resize a pixmap.
 
void SetDoubleBufferOFF() override
Turn double buffer mode off.
 
void SetTextColor(Color_t cindex) override
Set color index for text.
 
void UpdateWindow(Int_t mode) override
Update display.
 
Bool_t fHasXft
True when XftFonts are used.
 
Int_t SupportsExtension(const char *ext) const override
Returns 1 if window system server supports extension given by the argument, returns 0 in case extensi...
 
Int_t InitWindow(ULong_t window) override
Open window and return window number.
 
~TGX11() override
Destructor.
 
void MoveWindow(Int_t wid, Int_t x, Int_t y) override
Move the window wid.
 
Int_t SetTextFont(char *fontname, ETextSetMode mode) override
Set text font to specified name.
 
void SetFillStyle(Style_t style) override
Set fill area style.
 
void ClearPixmap(Drawable *pix)
Clear the pixmap pix.
 
Float_t fTextMagnitude
Text Magnitude.
 
void SetCharacterUp(Float_t chupx, Float_t chupy) override
Set character up vector.
 
Drawable fRootWin
Root window used as parent of all windows.
 
void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname) override
Write the pixmap wid in the bitmap file pxname.
 
void SetInput(Int_t inp)
Set input on or off.
 
void GetPlanes(Int_t &nplanes) override
Get maximum number of planes.
 
Int_t fTextAlignH
Text Alignment Horizontal.
 
void ClearWindow() override
Clear current window.
 
void * fXEvent
Current native (X11) event.
 
Int_t fGreenShift
Bits to left shift green.
 
void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override
Draw a box.
 
void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos) override
Copy the pixmap wid at the position xpos, ypos in the current window.
 
void SetOpacity(Int_t percent) override
Set opacity of a window.
 
Int_t OpenPixmap(UInt_t w, UInt_t h) override
Open a new pixmap.
 
XColor_t & GetColor(Int_t cid)
Return reference to internal color structure associated to color index cid.
 
Int_t fBlueDiv
Blue value divider.
 
void DrawPolyMarker(Int_t n, TPoint *xy) override
Draw n markers with the current attributes at position x, y.
 
void CloseWindow() override
Delete current window.
 
void SetMarkerSize(Float_t markersize) override
Set marker size index.
 
void CopyWindowtoPixmap(Drawable *pix, Int_t xpos, Int_t ypos)
Copy area of current window in the pixmap pix.
 
Drawable fVisRootWin
Root window with fVisual to be used to create GC's and XImages.
 
void SetDoubleBufferON() override
Turn double buffer mode on.
 
TExMap * fColors
Hash list of colors.
 
Int_t fTextAlign
Text alignment (set in SetTextAlign)
 
void SetMarkerType(Int_t type, Int_t n, RXPoint *xy)
Set marker type.
 
Int_t fRedDiv
Red value divider, -1 if no TrueColor visual.
 
Int_t fDepth
Number of color planes.
 
Bool_t Init(void *display) override
Initialize X11 system. Returns kFALSE in case of failure.
 
void SetLineType(Int_t n, Int_t *dash) override
Set line type.
 
void CloseWindow1()
Delete current window.
 
ULong_t fBlackPixel
Value of black pixel in colormap.
 
void SetTextSize(Float_t textsize) override
Set current text size.
 
Float_t fCharacterUpX
Character Up vector along X.
 
void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t *ic) override
Draw a cell array.
 
void SetLineStyle(Style_t linestyle) override
Set line style.
 
Int_t fGreenDiv
Green value divider.
 
void QueryPointer(Int_t &ix, Int_t &iy) override
Query pointer position.
 
ULong_t GetPixel(Color_t cindex) override
Return pixel value associated to specified ROOT color number.
 
TGX11()
Default constructor.
 
void GetTextExtent(UInt_t &w, UInt_t &h, char *mess) override
Return the size of a character string.
 
void ClosePixmap() override
Delete current pixmap.
 
Int_t fRedShift
Bits to left shift red, -1 if no TrueColor visual.
 
Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y) override
Request Locator position.
 
Int_t OpenDisplay(void *display)
Open the display. Return -1 if the opening fails, 0 when ok.
 
void DrawPolyLine(Int_t n, TPoint *xy) override
Draw a line through all points.
 
void RemovePixmap(Drawable *pix)
Remove the pixmap pix.
 
void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Set clipping region for the window wid.
 
Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h) override
Register pixmap created by gVirtualGL.
 
void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b) override
Set color intensities for given color index.
 
void FindUsableVisual(RXVisualInfo *vlist, Int_t nitems)
Check if visual is usable, if so set fVisual, fDepth, fColormap, fBlackPixel and fWhitePixel.
 
void GetCharacterUp(Float_t &chupx, Float_t &chupy) override
Return character up vector.
 
void SetDoubleBuffer(Int_t wid, Int_t mode) override
Set the double buffer on/off on window wid.
 
Int_t fMaxNumberOfWindows
Maximum number of windows.
 
void SetMarkerStyle(Style_t markerstyle) override
Set marker style.
 
void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b) override
Get rgb values for color "index".
 
void ImgPickPalette(RXImage *image, Int_t &ncol, Int_t *&R, Int_t *&G, Int_t *&B)
Returns in R G B the ncol colors of the palette used by the image.
 
Int_t FindColor(ULong_t pixel, ULong_t *orgcolors, Int_t ncolors)
Returns index in orgcolors (and fNewColors) for pixel.
 
void SetFillStyleIndex(Int_t style, Int_t fasi)
Set fill area style index.
 
RVisual * fVisual
Pointer to visual used by all windows.
 
void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2) override
Draw a line.
 
Window_t GetCurrentWindow() const override
Return current window pointer. Protected method used by TGX11TTF.
 
void RemoveWindow(ULong_t qwid) override
Remove a window created by Qt (like CloseWindow1()).
 
Int_t RequestString(Int_t x, Int_t y, char *text) override
Request a string.
 
void SetLineWidth(Width_t width) override
Set line width.
 
XWindow_t * fWindows
List of windows.
 
void PutImage(Int_t offset, Int_t itran, Int_t x0, Int_t y0, Int_t nx, Int_t ny, Int_t xmin, Int_t ymin, Int_t xmax, Int_t ymax, UChar_t *image, Drawable_t id)
Draw image.
 
Int_t GetDoubleBuffer(Int_t wid) override
Query the double buffer value for the window wid.
 
void FindBestVisual()
Find best visual, i.e.
 
void SetDrawMode(EDrawMode mode) override
Set the drawing mode.
 
void SetColor(void *gc, Int_t ci)
Set the foreground color in GC.
 
const char * DisplayName(const char *dpyName=nullptr) override
Return hostname on which the display is opened.
 
Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0) override
If id is NULL - loads the specified gif file at position [x0,y0] in the current window.
 
Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h) override
Register a window created by Qt as a ROOT window (like InitWindow()).
 
Float_t fCharacterUpY
Character Up vector along Y.
 
Bool_t fHasTTFonts
True when TrueType fonts are used.
 
void SelectWindow(Int_t wid) override
Select window to which subsequent output is directed.
 
Int_t GetEntries() const override
Return the number of objects in array (i.e.
 
TObject * At(Int_t idx) const override
 
Collectable string class.
 
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
 
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
 
static void * Alloc(size_t size)
Allocate a block of memory, that later can be resized using TStorage::ReAlloc().
 
static void Dealloc(void *ptr)
De-allocate block of memory, that was allocated via TStorage::Alloc().
 
static void * ReAlloc(void *vp, size_t size, size_t oldsize)
Reallocate (i.e.
 
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
 
const char * GetLineStyleString(Int_t i=1) const
Return line style string (used by PostScript).
 
Semi-Abstract base class defining a generic interface to the underlying, low level,...
 
Double_t ACos(Double_t)
Returns the principal value of the arc cosine of x, expressed in radians.
 
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
 
Double_t Floor(Double_t x)
Rounds x downward, returning the largest integral value that is not greater than x.
 
Double_t Sqrt(Double_t x)
Returns the square root of x.
 
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
 
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
 
Description of a X11 color.
 
Bool_t fDefined
true if pixel value is defined
 
UShort_t fRed
red value in range [0,kBIGGEST_RGB_VALUE]
 
UShort_t fGreen
green value
 
ULong_t fPixel
color pixel value
 
Description of a X11 window.
 
Int_t fOpen
1 if the window is open, 0 if not
 
Int_t fClip
1 if the clipping is on
 
Drawable fWindow
X11 window.
 
ULong_t * fNewColors
new image colors (after processing)
 
Int_t fNcolors
number of different colors
 
Drawable fDrawing
drawing area, equal to window or buffer
 
Int_t fDoubleBuffer
1 if the double buffer is on, 0 if not
 
UInt_t fHeight
height of the window
 
Int_t fIsPixmap
1 if pixmap, 0 if not
 
UInt_t fWidth
width of the window
 
UInt_t fHclip
height of the clipping rectangle
 
Bool_t fShared
notify when window is shared
 
Drawable fBuffer
pixmap used for double buffer
 
Int_t fXclip
x coordinate of the clipping rectangle
 
UInt_t fWclip
width of the clipping rectangle
 
Int_t fYclip
y coordinate of the clipping rectangle
 
#define org(otri, vertexptr)
 
int GIFdecode(byte *GIFarr, byte *PIXarr, int *Width, int *Height, int *Ncols, byte *R, byte *G, byte *B)
 
int GIFinfo(byte *GIFarr, int *Width, int *Height, int *Ncols)
 
long GIFencode(int Width, int Height, int Ncol, R, G, B, ScLine, void *get_scline, pb)