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};
388 for (
Int_t i = 0; i < ncolors; i++) {
410 unsigned int ww,
hh, border,
depth;
425 if (!
gCws->fIsPixmap && !
gCws->fDoubleBuffer) {
473 if (
gCws->fNewColors) {
476 delete []
gCws->fNewColors;
477 gCws->fNewColors =
nullptr;
513 unsigned int ww,
hh, border,
depth;
569 for (i = 0; i <
nx; i++) {
571 for (
j = 0;
j <
ny;
j++) {
592 XPoint *
xyp = (XPoint*)
xy;
627 XPoint *
xyp = (XPoint*)
xy;
653 for (i = 1; i <
n; i++) {
707 XPoint *
xyp = (XPoint*)
xy;
710 const int kNMAX = 1000000;
712 for (
int it=0;it<=
nt;it++) {
723 for (
m = 0;
m <
n;
m++) {
742 for (i = 0; i <
gMarker.n; i++) {
752 for (i = 0; i <
gMarker.n; i++) {
759 for (i = 0; i <
gMarker.n; i += 2)
820 {
nullptr, 0 , 0 , 24 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
821 {
nullptr, 0 , 0 , 32 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
822 {
nullptr, 0 , 0 , 16 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
823 {
nullptr, 0 , 0 , 15 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
825 {
nullptr, 0 , 0 , 24 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
826 {
nullptr, 0 , 0 , 32 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
827 {
nullptr, 0 , 0 , 16 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
828 {
nullptr, 0 , 0 , 15 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
829 {
nullptr, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
859 Printf(
"Selected visual 0x%lx: depth %d, class %d, colormap: %s",
904 attr.override_redirect = True;
963 Error(
"GetGC",
"trying to get illegal GC (which = %d)",
which);
978 return gTws->fDoubleBuffer;
1001 unsigned int border,
depth;
1060 }
else if (
index == 1) {
1112 if (!
gTws->fOpen)
return;
1145 for (i = 0; i <
kMAXGC; i++)
1153 Error(
"OpenDisplay",
"cannot get GC values");
1178 gFont[i].id =
nullptr;
1198 Warning(
"OpenDisplay",
"no default font loaded");
1239 if ((
fVisual->blue_mask >> i) == 1) {
1247 if ((
fVisual->green_mask >> i) == 1) {
1255 if ((
fVisual->red_mask >> i) == 1) {
1277 unsigned int ww,
hh, border,
depth;
1304 for (i = 0; i <
kMAXGC; i++)
1314 gCws->fDoubleBuffer = 0;
1315 gCws->fIsPixmap = 1;
1319 gCws->fNewColors =
nullptr;
1372 attributes.backing_store = Always;
1393 gCws->fDoubleBuffer = 0;
1394 gCws->fIsPixmap = 0;
1398 gCws->fNewColors =
nullptr;
1437 gCws->fDoubleBuffer = 0;
1438 gCws->fIsPixmap = 0;
1442 gCws->fNewColors =
nullptr;
1457 if (
gCws->fNewColors) {
1460 delete []
gCws->fNewColors;
1461 gCws->fNewColors =
nullptr;
1536 static int xloc = 0;
1537 static int yloc = 0;
1538 static int xlocp = 0;
1539 static int ylocp = 0;
1638 xloc =
event.xbutton.x;
1639 yloc =
event.xbutton.y;
1641 switch (event.type) {
1656 xlocp =
event.xbutton.x;
1657 ylocp =
event.xbutton.y;
1665 xlocp =
event.xbutton.x;
1666 ylocp =
event.xbutton.y;
1673 xlocp =
event.xbutton.x;
1674 ylocp =
event.xbutton.y;
1681 xlocp =
event.xbutton.x;
1682 ylocp =
event.xbutton.y;
1696 x =
event.xbutton.x;
1697 y =
event.xbutton.y;
1750 switch (event.type) {
1776 for (i =
nt - 1; i >
pt; i--)
1790 for (i =
pt; i <
nt; i++)
1809 for (i =
pt; i <
nt; i++)
1827 for (i =
pt; i <
nt; i++)
1875 if (!
gTws->fOpen)
return;
1878 if (
gTws->fWidth ==
w &&
gTws->fHeight ==
h)
return;
1882 if (
gTws->fBuffer) {
1892 if (
gTws->fDoubleBuffer)
gTws->fDrawing =
gTws->fBuffer;
1909 unsigned int ww,
hh, border,
depth;
1930 for (i = 0; i <
kMAXGC; i++)
1969 if (
gTws->fBuffer) {
1978 if (
gTws->fDoubleBuffer)
gTws->fDrawing =
gTws->fBuffer;
1996 if (
gCws->fClip && !
gCws->fIsPixmap && !
gCws->fDoubleBuffer) {
2001 for (i = 0; i <
kMAXGC; i++)
2004 for (i = 0; i <
kMAXGC; i++)
2038 for (
int i = 0; i <
kMAXGC; i++)
2058 if (
gTws->fClip && !
gTws->fIsPixmap && !
gTws->fDoubleBuffer) {
2064 for (
int i = 0; i <
kMAXGC; i++)
2097 if (values.foreground == values.background)
2138 if (!
gTws->fOpen)
return;
2155 if (!
gTws->fDoubleBuffer)
return;
2156 gTws->fDoubleBuffer = 0;
2165 if (
gTws->fDoubleBuffer ||
gTws->fIsPixmap)
return;
2166 if (!
gTws->fBuffer) {
2174 gTws->fDoubleBuffer = 1;
2362 }
else if (
lstyle == 2 ) {
2364 }
else if (
lstyle == 3 ) {
2366 }
else if (
lstyle == 4 ) {
2429 if (
msize < 0)
return;
2454 for (
int i = 0; i <
gMarker.n; i++) {
2484 shape[0].x = -
im; shape[0].y = 0;
2485 shape[1].x =
im; shape[1].y = 0;
2486 shape[2].x = 0 ; shape[2].y = -
im;
2487 shape[3].x = 0 ; shape[3].y =
im;
2491 shape[0].x = -
im; shape[0].y = 0;
2492 shape[1].x =
im; shape[1].y = 0;
2493 shape[2].x = 0 ; shape[2].y = -
im;
2494 shape[3].x = 0 ; shape[3].y =
im;
2496 shape[4].x = -
im; shape[4].y = -
im;
2497 shape[5].x =
im; shape[5].y =
im;
2498 shape[6].x = -
im; shape[6].y =
im;
2499 shape[7].x =
im; shape[7].y = -
im;
2507 shape[0].x = -
im; shape[0].y = -
im;
2508 shape[1].x =
im; shape[1].y =
im;
2509 shape[2].x = -
im; shape[2].y =
im;
2510 shape[3].x =
im; shape[3].y = -
im;
2514 shape[0].x = -1 ; shape[0].y = 0;
2515 shape[1].x = 1 ; shape[1].y = 0;
2516 shape[2].x = 0 ; shape[2].y = -1;
2517 shape[3].x = 0 ; shape[3].y = 1;
2521 shape[0].x = -1 ; shape[0].y = 1;
2522 shape[1].x = 1 ; shape[1].y = 1;
2523 shape[2].x = -1 ; shape[2].y = 0;
2524 shape[3].x = 1 ; shape[3].y = 0;
2525 shape[4].x = -1 ; shape[4].y = -1;
2526 shape[5].x = 1 ; shape[5].y = -1;
2533 shape[0].x = -
im; shape[0].y = -
im;
2534 shape[1].x =
im; shape[1].y = -
im;
2535 shape[2].x =
im; shape[2].y =
im;
2536 shape[3].x = -
im; shape[3].y =
im;
2537 shape[4].x = -
im; shape[4].y = -
im;
2541 shape[0].x = -
im; shape[0].y =
im;
2542 shape[1].x =
im; shape[1].y =
im;
2543 shape[2].x = 0; shape[2].y = -
im;
2544 shape[3].x = -
im; shape[3].y =
im;
2548 shape[0].x = 0; shape[0].y =
im;
2549 shape[1].x =
im; shape[1].y = -
im;
2550 shape[2].x = -
im; shape[2].y = -
im;
2551 shape[3].x = 0; shape[3].y =
im;
2555 shape[0].x = -
im; shape[0].y = -
im;
2556 shape[1].x =
im; shape[1].y = -
im;
2557 shape[2].x =
im; shape[2].y =
im;
2558 shape[3].x = -
im; shape[3].y =
im;
2559 shape[4].x = -
im; shape[4].y = -
im;
2563 shape[0].x = -
im; shape[0].y =
im;
2564 shape[1].x =
im; shape[1].y =
im;
2565 shape[2].x = 0; shape[2].y = -
im;
2566 shape[3].x = -
im; shape[3].y =
im;
2571 shape[0].x =-
imx; shape[0].y = 0;
2572 shape[1].x = 0; shape[1].y = -
im;
2573 shape[2].x =
imx; shape[2].y = 0;
2574 shape[3].x = 0; shape[3].y =
im;
2575 shape[4].x =-
imx; shape[4].y = 0;
2580 shape[0].x = -
im; shape[0].y =-
imx;
2581 shape[1].x =-
imx; shape[1].y =-
imx;
2582 shape[2].x =-
imx; shape[2].y = -
im;
2583 shape[3].x =
imx; shape[3].y = -
im;
2584 shape[4].x =
imx; shape[4].y =-
imx;
2585 shape[5].x =
im; shape[5].y =-
imx;
2586 shape[6].x =
im; shape[6].y =
imx;
2587 shape[7].x =
imx; shape[7].y =
imx;
2588 shape[8].x =
imx; shape[8].y =
im;
2589 shape[9].x =-
imx; shape[9].y =
im;
2590 shape[10].x=-
imx; shape[10].y=
imx;
2591 shape[11].x= -
im; shape[11].y=
imx;
2592 shape[12].x= -
im; shape[12].y=-
imx;
2600 shape[0].x = -
im; shape[0].y =
im4;
2601 shape[1].x =-
im2; shape[1].y =-
im1;
2602 shape[2].x =-
im3; shape[2].y = -
im;
2603 shape[3].x = 0; shape[3].y =-
im2;
2604 shape[4].x =
im3; shape[4].y = -
im;
2605 shape[5].x =
im2; shape[5].y =-
im1;
2606 shape[6].x =
im; shape[6].y =
im4;
2607 shape[7].x =
im4; shape[7].y =
im4;
2608 shape[8].x = 0; shape[8].y =
im;
2609 shape[9].x =-
im4; shape[9].y =
im4;
2610 shape[10].x= -
im; shape[10].y=
im4;
2618 shape[0].x = -
im; shape[0].y =
im4;
2619 shape[1].x =-
im2; shape[1].y =-
im1;
2620 shape[2].x =-
im3; shape[2].y = -
im;
2621 shape[3].x = 0; shape[3].y =-
im2;
2622 shape[4].x =
im3; shape[4].y = -
im;
2623 shape[5].x =
im2; shape[5].y =-
im1;
2624 shape[6].x =
im; shape[6].y =
im4;
2625 shape[7].x =
im4; shape[7].y =
im4;
2626 shape[8].x = 0; shape[8].y =
im;
2627 shape[9].x =-
im4; shape[9].y =
im4;
2628 shape[10].x= -
im; shape[10].y=
im4;
2632 shape[0].x = 0; shape[0].y =
im;
2633 shape[1].x =
im; shape[1].y = -
im;
2634 shape[2].x = -
im; shape[2].y = -
im;
2635 shape[3].x = 0; shape[3].y =
im;
2640 shape[0].x =-
imx; shape[0].y = 0;
2641 shape[1].x = 0; shape[1].y = -
im;
2642 shape[2].x =
imx; shape[2].y = 0;
2643 shape[3].x = 0; shape[3].y =
im;
2644 shape[4].x =-
imx; shape[4].y = 0;
2649 shape[0].x = -
im; shape[0].y =-
imx;
2650 shape[1].x =-
imx; shape[1].y =-
imx;
2651 shape[2].x =-
imx; shape[2].y = -
im;
2652 shape[3].x =
imx; shape[3].y = -
im;
2653 shape[4].x =
imx; shape[4].y =-
imx;
2654 shape[5].x =
im; shape[5].y =-
imx;
2655 shape[6].x =
im; shape[6].y =
imx;
2656 shape[7].x =
imx; shape[7].y =
imx;
2657 shape[8].x =
imx; shape[8].y =
im;
2658 shape[9].x =-
imx; shape[9].y =
im;
2659 shape[10].x=-
imx; shape[10].y=
imx;
2660 shape[11].x= -
im; shape[11].y=
imx;
2661 shape[12].x= -
im; shape[12].y=-
imx;
2665 shape[0].x =-
im; shape[0].y = 0;
2666 shape[1].x = 0; shape[1].y = -
im;
2667 shape[2].x =
im; shape[2].y = 0;
2668 shape[3].x = 0; shape[3].y =
im;
2669 shape[4].x =-
im; shape[4].y = 0;
2670 shape[5].x =
im; shape[5].y = 0;
2671 shape[6].x = 0; shape[6].y =
im;
2672 shape[7].x = 0; shape[7].y =-
im;
2676 shape[0].x = -
im; shape[0].y = -
im;
2677 shape[1].x =
im; shape[1].y = -
im;
2678 shape[2].x =
im; shape[2].y =
im;
2679 shape[3].x = -
im; shape[3].y =
im;
2680 shape[4].x = -
im; shape[4].y = -
im;
2681 shape[5].x =
im; shape[5].y =
im;
2682 shape[6].x = -
im; shape[6].y =
im;
2683 shape[7].x =
im; shape[7].y = -
im;
2688 shape[0].x = 0; shape[0].y = 0;
2689 shape[1].x =-
im2; shape[1].y =
im;
2690 shape[2].x =
im2; shape[2].y =
im;
2691 shape[3].x = 0; shape[3].y = 0;
2692 shape[4].x =-
im2; shape[4].y = -
im;
2693 shape[5].x = -
im; shape[5].y = 0;
2694 shape[6].x = 0; shape[6].y = 0;
2695 shape[7].x =
im; shape[7].y = 0;
2696 shape[8].x =
im2; shape[8].y = -
im;
2697 shape[9].x = 0; shape[9].y = 0;
2702 shape[0].x = -
im; shape[0].y = 0;
2703 shape[1].x = -
im; shape[1].y =-
im2;
2704 shape[2].x =-
im2; shape[2].y = -
im;
2705 shape[3].x =
im2; shape[3].y = -
im;
2706 shape[4].x =
im; shape[4].y =-
im2;
2707 shape[5].x =
im; shape[5].y =
im2;
2708 shape[6].x =
im2; shape[6].y =
im;
2709 shape[7].x =-
im2; shape[7].y =
im;
2710 shape[8].x = -
im; shape[8].y =
im2;
2711 shape[9].x = -
im; shape[9].y = 0;
2712 shape[10].x =
im; shape[10].y = 0;
2713 shape[11].x = 0; shape[11].y = 0;
2714 shape[12].x = 0; shape[12].y = -
im;
2715 shape[13].x = 0; shape[13].y =
im;
2716 shape[14].x = 0; shape[14].y = 0;
2721 shape[0].x = 0; shape[0].y = 0;
2722 shape[1].x =-
im2; shape[1].y =
im;
2723 shape[2].x =
im2; shape[2].y =
im;
2724 shape[3].x = 0; shape[3].y = 0;
2725 shape[4].x =-
im2; shape[4].y = -
im;
2726 shape[5].x = -
im; shape[5].y = 0;
2727 shape[6].x = 0; shape[6].y = 0;
2728 shape[7].x =
im; shape[7].y = 0;
2729 shape[8].x =
im2; shape[8].y = -
im;
2734 shape[0].x = 0; shape[0].y = 0;
2735 shape[1].x =
im2; shape[1].y =
im;
2736 shape[2].x =
im; shape[2].y =
im2;
2737 shape[3].x = 0; shape[3].y = 0;
2738 shape[4].x =
im; shape[4].y = -
im2;
2739 shape[5].x =
im2; shape[5].y = -
im;
2740 shape[6].x = 0; shape[6].y = 0;
2741 shape[7].x = -
im2; shape[7].y = -
im;
2742 shape[8].x = -
im; shape[8].y = -
im2;
2743 shape[9].x = 0; shape[9].y = 0;
2744 shape[10].x = -
im; shape[10].y =
im2;
2745 shape[11].x = -
im2; shape[11].y =
im;
2746 shape[12].x = 0; shape[12].y = 0;
2751 shape[0].x = 0; shape[0].y = 0;
2752 shape[1].x =
im2; shape[1].y =
im;
2753 shape[2].x =
im; shape[2].y =
im2;
2754 shape[3].x = 0; shape[3].y = 0;
2755 shape[4].x =
im; shape[4].y = -
im2;
2756 shape[5].x =
im2; shape[5].y = -
im;
2757 shape[6].x = 0; shape[6].y = 0;
2758 shape[7].x = -
im2; shape[7].y = -
im;
2759 shape[8].x = -
im; shape[8].y = -
im2;
2760 shape[9].x = 0; shape[9].y = 0;
2761 shape[10].x = -
im; shape[10].y =
im2;
2762 shape[11].x = -
im2; shape[11].y =
im;
2763 shape[12].x = 0; shape[12].y = 0;
2768 shape[0].x= 0; shape[0].y=
im;
2769 shape[1].x= -
imx; shape[1].y=
imx;
2770 shape[2].x = -
im; shape[2].y = 0;
2771 shape[3].x = -
imx; shape[3].y = -
imx;
2772 shape[4].x = 0; shape[4].y = -
im;
2773 shape[5].x =
imx; shape[5].y = -
imx;
2774 shape[6].x =
im; shape[6].y = 0;
2775 shape[7].x=
imx; shape[7].y=
imx;
2776 shape[8].x= 0; shape[8].y=
im;
2781 shape[0].x = 0; shape[0].y =
im;
2782 shape[1].x = -
imx; shape[1].y =
imx;
2783 shape[2].x = -
im; shape[2].y = 0;
2784 shape[3].x = -
imx; shape[3].y = -
imx;
2785 shape[4].x = 0; shape[4].y = -
im;
2786 shape[5].x =
imx; shape[5].y = -
imx;
2787 shape[6].x =
im; shape[6].y = 0;
2788 shape[7].x =
imx; shape[7].y =
imx;
2789 shape[8].x = 0; shape[8].y =
im;
2794 shape[0].x = 0; shape[0].y = 0;
2795 shape[1].x =
im2; shape[1].y =
im;
2796 shape[2].x = -
im2; shape[2].y =
im;
2797 shape[3].x =
im2; shape[3].y = -
im;
2798 shape[4].x = -
im2; shape[4].y = -
im;
2799 shape[5].x = 0; shape[5].y = 0;
2800 shape[6].x =
im; shape[6].y =
im2;
2801 shape[7].x =
im; shape[7].y = -
im2;
2802 shape[8].x = -
im; shape[8].y =
im2;
2803 shape[9].x = -
im; shape[9].y = -
im2;
2804 shape[10].x = 0; shape[10].y = 0;
2810 shape[0].x =
im0; shape[0].y =
im0;
2811 shape[1].x =
im2; shape[1].y =
im;
2812 shape[2].x = -
im2; shape[2].y =
im;
2813 shape[3].x = -
im0; shape[3].y =
im0;
2814 shape[4].x = -
im; shape[4].y =
im2;
2815 shape[5].x = -
im; shape[5].y = -
im2;
2816 shape[6].x = -
im0; shape[6].y = -
im0;
2817 shape[7].x = -
im2; shape[7].y = -
im;
2818 shape[8].x =
im2; shape[8].y = -
im;
2819 shape[9].x =
im0; shape[9].y = -
im0;
2820 shape[10].x =
im; shape[10].y = -
im2;
2821 shape[11].x =
im; shape[11].y =
im2;
2822 shape[12].x =
im0; shape[12].y =
im0;
2827 shape[0].x = 0; shape[0].y =
im2;
2828 shape[1].x = -
im2; shape[1].y =
im;
2829 shape[2].x = -
im; shape[2].y =
im2;
2830 shape[3].x = -
im2; shape[3].y = 0;
2831 shape[4].x = -
im; shape[4].y = -
im2;
2832 shape[5].x = -
im2; shape[5].y = -
im;
2833 shape[6].x = 0; shape[6].y = -
im2;
2834 shape[7].x =
im2; shape[7].y = -
im;
2835 shape[8].x =
im; shape[8].y = -
im2;
2836 shape[9].x =
im2; shape[9].y = 0;
2837 shape[10].x =
im; shape[10].y =
im2;
2838 shape[11].x =
im2; shape[11].y =
im;
2839 shape[12].x = 0; shape[12].y =
im2;
2844 shape[0].x = 0; shape[0].y =
im2;
2845 shape[1].x = -
im2; shape[1].y =
im;
2846 shape[2].x = -
im; shape[2].y =
im2;
2847 shape[3].x = -
im2; shape[3].y = 0;
2848 shape[4].x = -
im; shape[4].y = -
im2;
2849 shape[5].x = -
im2; shape[5].y = -
im;
2850 shape[6].x = 0; shape[6].y = -
im2;
2851 shape[7].x =
im2; shape[7].y = -
im;
2852 shape[8].x =
im; shape[8].y = -
im2;
2853 shape[9].x =
im2; shape[9].y = 0;
2854 shape[10].x =
im; shape[10].y =
im2;
2855 shape[11].x =
im2; shape[11].y =
im;
2856 shape[12].x = 0; shape[12].y =
im2;
2861 shape[0].x = 0; shape[0].y =
im2*1.005;
2862 shape[1].x = -
im2; shape[1].y =
im;
2863 shape[2].x = -
im; shape[2].y =
im2;
2864 shape[3].x = -
im2; shape[3].y = 0;
2865 shape[4].x = -
im; shape[4].y = -
im2;
2866 shape[5].x = -
im2; shape[5].y = -
im;
2867 shape[6].x = 0; shape[6].y = -
im2;
2868 shape[7].x =
im2; shape[7].y = -
im;
2869 shape[8].x =
im; shape[8].y = -
im2;
2870 shape[9].x =
im2; shape[9].y = 0;
2871 shape[10].x =
im; shape[10].y =
im2;
2872 shape[11].x =
im2; shape[11].y =
im;
2873 shape[12].x = 0; shape[12].y =
im2*0.995;
2874 shape[13].x =
im2*0.995; shape[13].y = 0;
2875 shape[14].x = 0; shape[14].y = -
im2*0.995;
2876 shape[15].x = -
im2*0.995; shape[15].y = 0;
2877 shape[16].x = 0; shape[16].y =
im2*0.995;
2882 shape[0].x =-
imx; shape[0].y =-
imx*1.005;
2883 shape[1].x =-
imx; shape[1].y = -
im;
2884 shape[2].x =
imx; shape[2].y = -
im;
2885 shape[3].x =
imx; shape[3].y =-
imx;
2886 shape[4].x =
im; shape[4].y =-
imx;
2887 shape[5].x =
im; shape[5].y =
imx;
2888 shape[6].x =
imx; shape[6].y =
imx;
2889 shape[7].x =
imx; shape[7].y =
im;
2890 shape[8].x =-
imx; shape[8].y =
im;
2891 shape[9].x =-
imx; shape[9].y =
imx;
2892 shape[10].x = -
im; shape[10].y =
imx;
2893 shape[11].x = -
im; shape[11].y =-
imx;
2894 shape[12].x =-
imx; shape[12].y =-
imx*0.995;
2895 shape[13].x =-
imx; shape[13].y =
imx;
2896 shape[14].x =
imx; shape[14].y =
imx;
2897 shape[15].x =
imx; shape[15].y =-
imx;
2898 shape[16].x =-
imx; shape[16].y =-
imx*1.005;
2923 if (
gCws->fNewColors) {
2949 if (
gCws->fNewColors) {
2987 for (
int i = 0; i < ncolors; i++)
3005 if (ncolors == 0)
return;
3010 for (i = 0; i < ncolors; i++) {
3020 for (i = 0; i < ncolors; i++) {
3021 val =
xcol[i].red + add;
3024 val =
xcol[i].green + add;
3027 val =
xcol[i].blue + add;
3031 Warning(
"MakeOpaqueColors",
"failed to allocate color %hd, %hd, %hd",
3037 gCws->fNcolors = ncolors;
3039 for (i = 0; i < ncolors; i++)
3040 gCws->fNewColors[i] =
xcol[i].pixel;
3050 for (
int i = 0; i < ncolors; i++)
3053 Error(
"FindColor",
"did not find color, should never happen!");
3167 Error(
"SetTextColor",
"cannot get GC values");
3269 if (
gCws->fDoubleBuffer) {
3339 for (
int i = 0; i <
width; i++)
3378 for (i = 0; i < ncolors; i++) {
3389 B =
new Int_t[ncolors];
3391 for (i = 0; i < ncolors; i++) {
3393 G[i] =
xcol[i].green;
3394 B[i] =
xcol[i].blue;
3435 Error(
"WriteGIF",
"Cannot create GIF of image containing more than 256 colors. Try in batch mode.");
3443 for (i = 0; i <
ncol; i++) {
3452 for (i = 0; i <
ncol; i++) {
3467 Error(
"WriteGIF",
"cannot write file: %s",
name);
3492 id =
gCws->fDrawing;
3495 for (i = 0; i < 256; i++)
nlines[i] = 0;
3532 for (i = 0; i < 256; i++) {
3553 fd =
fopen(file,
"r");
3555 Error(
"ReadGIF",
"unable to open GIF file");
3562 Error(
"ReadGIF",
"unable to open GIF file");
3571 Error(
"ReadGIF",
"unable to allocate array for gif");
3577 Error(
"ReadGIF",
"GIF file read failed");
3591 Error(
"ReadGIF",
"unable to allocate array for image");
3607 for (i = 0; i <
ncolor; i++) {
3617 for (i = 1; i <=
height/2; i++) {
3620 for (k = 0; k <
width; k++) {
3625 PutImage(
offset,-1,x0,
y0,
width,
height,0,0,
width-1,
height-1,
pixArr,
pic);
3632 else if (
gCws->fDrawing)
3701 gCws->fDoubleBuffer = 0;
3702 gCws->fIsPixmap = 1;
3706 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.
short Style_t
Style number (short)
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short)
int Int_t
Signed integer 4 bytes (int)
unsigned char Byte_t
Byte (8 bits) (unsigned char)
short Color_t
Color number (short)
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char)
constexpr ULong_t kBitsPerByte
int Seek_t
File pointer (int).
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
short Width_t
Line width (short)
float Float_t
Float 4 bytes (float)
short Font_t
Font number (short)
short Short_t
Signed Short integer 2 bytes (short)
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)
Int_t gDebug
Global variable setting the debug level. Set to 0 to disable, increase it in steps of 1 to increase t...
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.
void DrawLinesSegments(Int_t n, TPoint *xy) override
Draws N segments between provided points.
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.
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.
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
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)