52#include <X11/cursorfont.h>
53#include <X11/keysym.h>
62# include <sys/socket.h>
77 int,
int,
char*,
int);
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++) {
411 unsigned int ww,
hh, border,
depth;
424 if (!
gCws->fIsPixmap && !
gCws->fDoubleBuffer) {
472 if (
gCws->fNewColors) {
475 delete []
gCws->fNewColors;
476 gCws->fNewColors =
nullptr;
512 unsigned int ww,
hh, border,
depth;
568 for (i = 0; i <
nx; i++) {
570 for (
j = 0;
j <
ny;
j++) {
591 XPoint *
xyp = (XPoint*)
xy;
626 XPoint *
xyp = (XPoint*)
xy;
652 for (i = 1; i <
n; i++) {
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)
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 },
830 Printf(
"Selected visual 0x%lx: depth %d, class %d, colormap: %s",
875 attr.override_redirect = True;
934 Error(
"GetGC",
"trying to get illegal GC (which = %d)",
which);
949 return gTws->fDoubleBuffer;
972 unsigned int border,
depth;
1031 }
else if (
index == 1) {
1083 if (!
gTws->fOpen)
return;
1116 for (i = 0; i <
kMAXGC; i++)
1124 Error(
"OpenDisplay",
"cannot get GC values");
1149 gFont[i].id =
nullptr;
1169 Warning(
"OpenDisplay",
"no default font loaded");
1210 if ((
fVisual->blue_mask >> i) == 1) {
1218 if ((
fVisual->green_mask >> i) == 1) {
1226 if ((
fVisual->red_mask >> i) == 1) {
1248 unsigned int ww,
hh, border,
depth;
1275 for (i = 0; i <
kMAXGC; i++)
1285 gCws->fDoubleBuffer = 0;
1286 gCws->fIsPixmap = 1;
1290 gCws->fNewColors =
nullptr;
1343 attributes.backing_store = Always;
1364 gCws->fDoubleBuffer = 0;
1365 gCws->fIsPixmap = 0;
1369 gCws->fNewColors =
nullptr;
1408 gCws->fDoubleBuffer = 0;
1409 gCws->fIsPixmap = 0;
1413 gCws->fNewColors =
nullptr;
1428 if (
gCws->fNewColors) {
1431 delete []
gCws->fNewColors;
1432 gCws->fNewColors =
nullptr;
1507 static int xloc = 0;
1508 static int yloc = 0;
1509 static int xlocp = 0;
1510 static int ylocp = 0;
1609 xloc =
event.xbutton.x;
1610 yloc =
event.xbutton.y;
1612 switch (event.type) {
1627 xlocp =
event.xbutton.x;
1628 ylocp =
event.xbutton.y;
1636 xlocp =
event.xbutton.x;
1637 ylocp =
event.xbutton.y;
1644 xlocp =
event.xbutton.x;
1645 ylocp =
event.xbutton.y;
1652 xlocp =
event.xbutton.x;
1653 ylocp =
event.xbutton.y;
1667 x =
event.xbutton.x;
1668 y =
event.xbutton.y;
1721 switch (event.type) {
1747 for (i =
nt - 1; i >
pt; i--)
1761 for (i =
pt; i <
nt; i++)
1780 for (i =
pt; i <
nt; i++)
1798 for (i =
pt; i <
nt; i++)
1846 if (!
gTws->fOpen)
return;
1849 if (
gTws->fWidth ==
w &&
gTws->fHeight ==
h)
return;
1853 if (
gTws->fBuffer) {
1863 if (
gTws->fDoubleBuffer)
gTws->fDrawing =
gTws->fBuffer;
1880 unsigned int ww,
hh, border,
depth;
1901 for (i = 0; i <
kMAXGC; i++)
1940 if (
gTws->fBuffer) {
1949 if (
gTws->fDoubleBuffer)
gTws->fDrawing =
gTws->fBuffer;
1967 if (
gCws->fClip && !
gCws->fIsPixmap && !
gCws->fDoubleBuffer) {
1972 for (i = 0; i <
kMAXGC; i++)
1975 for (i = 0; i <
kMAXGC; i++)
2009 for (
int i = 0; i <
kMAXGC; i++)
2029 if (
gTws->fClip && !
gTws->fIsPixmap && !
gTws->fDoubleBuffer) {
2035 for (
int i = 0; i <
kMAXGC; i++)
2068 if (values.foreground == values.background)
2109 if (!
gTws->fOpen)
return;
2126 if (!
gTws->fDoubleBuffer)
return;
2127 gTws->fDoubleBuffer = 0;
2136 if (
gTws->fDoubleBuffer ||
gTws->fIsPixmap)
return;
2137 if (!
gTws->fBuffer) {
2145 gTws->fDoubleBuffer = 1;
2333 }
else if (
lstyle == 2 ) {
2335 }
else if (
lstyle == 3 ) {
2337 }
else if (
lstyle == 4 ) {
2400 if (
msize < 0)
return;
2425 for (
int i = 0; i <
gMarker.n; i++) {
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
2894 if (
gCws->fNewColors) {
2920 if (
gCws->fNewColors) {
2958 for (
int i = 0; i < ncolors; i++)
2976 if (ncolors == 0)
return;
2981 for (i = 0; i < ncolors; i++) {
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",
3008 gCws->fNcolors = ncolors;
3010 for (i = 0; i < ncolors; i++)
3011 gCws->fNewColors[i] =
xcol[i].pixel;
3021 for (
int i = 0; i < ncolors; i++)
3024 Error(
"FindColor",
"did not find color, should never happen!");
3138 Error(
"SetTextColor",
"cannot get GC values");
3240 if (
gCws->fDoubleBuffer) {
3310 for (
int i = 0; i <
width; i++)
3349 for (i = 0; i < ncolors; i++) {
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;
3406 Error(
"WriteGIF",
"Cannot create GIF of image containing more than 256 colors. Try in batch mode.");
3414 for (i = 0; i <
ncol; i++) {
3423 for (i = 0; i <
ncol; i++) {
3438 Error(
"WriteGIF",
"cannot write file: %s",
name);
3463 id =
gCws->fDrawing;
3466 for (i = 0; i < 256; i++)
nlines[i] = 0;
3503 for (i = 0; i < 256; i++) {
3524 fd =
fopen(file,
"r");
3526 Error(
"ReadGIF",
"unable to open GIF file");
3533 Error(
"ReadGIF",
"unable to open GIF file");
3542 Error(
"ReadGIF",
"unable to allocate array for gif");
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++) {
3591 for (k = 0; k <
width; k++) {
3596 PutImage(
offset,-1,x0,
y0,
width,
height,0,0,
width-1,
height-1,
pixArr,
pic);
3603 else if (
gCws->fDrawing)
3672 gCws->fDoubleBuffer = 0;
3673 gCws->fIsPixmap = 1;
3677 gCws->fNewColors =
nullptr;
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
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 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 org
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 t