52#include <X11/cursorfont.h>
53#include <X11/keysym.h>
62# include <sys/socket.h>
80 int,
int,
char*,
int);
1780x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1790x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1800x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
400 if (!
ctxt->fIsPixmap && !
ctxt->fDoubleBuffer) {
428 if (!
gCws->fNewColors.empty()) {
431 gCws->fNewColors.clear();
434 if (!
gCws->fShared) {
443 for (
int i = 0; i <
kMAXGC; ++i)
446 if (
gCws->fillPattern != 0) {
448 gCws->fillPattern = 0;
454 if (iter->second.get() ==
gCws) {
461 Fatal(
"CloseWindow",
"Not found gCws in list of windows");
465 if (iter->second && iter->second->fOpen) {
466 gCws = iter->second.get();
541 for (i = 0; i <
nx; i++) {
543 for (
j = 0;
j <
ny;
j++) {
578 if (
ctxt->fillHollow)
660 for (
int i = 1; i <
n; i++) {
667 ctxt->dashOffset %=
ctxt->dashLength;
740 if ((
ctxt->markerShape.size() == 0) && (
ctxt->markerSize <= 0)) {
741 const int kNMAX = 1000000;
743 for (
int it=0;it<=
nt;it++) {
751 int r =
ctxt->markerSize / 2;
752 auto &shape =
ctxt->markerShape;
754 for (
int m = 0;
m <
n;
m++) {
755 if (
ctxt->markerType == 0) {
759 }
else if (
ctxt->markerType == 1) {
764 for (
size_t i = 0; i < shape.size(); i++) {
765 shape[i].x +=
xyp[
m].x;
766 shape[i].y +=
xyp[
m].y;
768 switch(
ctxt->markerType) {
782 (
XSegment *) shape.data(), shape.size()/2);
785 for (
size_t i = 0; i < shape.size(); i++) {
786 shape[i].x -=
xyp[
m].x;
787 shape[i].y -=
xyp[
m].y;
844 if (!
text || !
ctxt->textFont ||
ctxt->fAttText.GetTextSize() < 0)
882 {
nullptr, 0 , 0 , 24 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
883 {
nullptr, 0 , 0 , 32 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
884 {
nullptr, 0 , 0 , 16 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
885 {
nullptr, 0 , 0 , 15 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
887 {
nullptr, 0 , 0 , 24 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
888 {
nullptr, 0 , 0 , 32 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
889 {
nullptr, 0 , 0 , 16 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
890 {
nullptr, 0 , 0 , 15 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
891 {
nullptr, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
921 Printf(
"Selected visual 0x%lx: depth %d, class %d, colormap: %s",
966 attr.override_redirect = True;
1025 Error(
"GetGC",
"trying to get illegal GC (which = %d)",
which);
1029 Error(
"GetGC",
"No current window selected");
1053 Error(
"GetGC",
"No window context specified");
1058 Error(
"GetGC",
"trying to get illegal GC (which = %d)",
which);
1083 return gTws->fDoubleBuffer;
1106 unsigned int border,
depth;
1165 }
else if (
index == 1) {
1218 if (!
gTws->fOpen)
return;
1267 gFont[i].id =
nullptr;
1287 Warning(
"OpenDisplay",
"no default font loaded");
1328 if ((
fVisual->blue_mask >> i) == 1) {
1336 if ((
fVisual->green_mask >> i) == 1) {
1344 if ((
fVisual->red_mask >> i) == 1) {
1365 if (!pair.second->fOpen) {
1366 pair.second->fOpen = 1;
1369 if (pair.first >
maxid)
1377 for (
int id = 1;
id <
maxid;
id++) {
1397 Error(
"AddWindowHandle",
"cannot get GC values");
1420 unsigned int ww,
hh, border,
depth;
1431 for (
int i = 0; i <
kMAXGC; i++)
1441 gCws->fDoubleBuffer = 0;
1442 gCws->fIsPixmap = 1;
1472 gCws->fDoubleBuffer = 0;
1482 attributes.backing_store = Always;
1503 gCws->fDoubleBuffer = 0;
1504 gCws->fIsPixmap = 0;
1521 gCws->fDoubleBuffer = 0;
1528 gCws->fDoubleBuffer = 0;
1529 gCws->fIsPixmap = 0;
1601 static int xloc = 0;
1602 static int yloc = 0;
1603 static int xlocp = 0;
1604 static int ylocp = 0;
1703 xloc =
event.xbutton.x;
1704 yloc =
event.xbutton.y;
1706 switch (event.type) {
1721 xlocp =
event.xbutton.x;
1722 ylocp =
event.xbutton.y;
1730 xlocp =
event.xbutton.x;
1731 ylocp =
event.xbutton.y;
1738 xlocp =
event.xbutton.x;
1739 ylocp =
event.xbutton.y;
1746 xlocp =
event.xbutton.x;
1747 ylocp =
event.xbutton.y;
1761 x =
event.xbutton.x;
1762 y =
event.xbutton.y;
1815 switch (event.type) {
1841 for (i =
nt - 1; i >
pt; i--)
1855 for (i =
pt; i <
nt; i++)
1874 for (i =
pt; i <
nt; i++)
1892 for (i =
pt; i <
nt; i++)
1938 if (!
gTws->fOpen)
return;
1941 if (
gTws->fWidth ==
w &&
gTws->fHeight ==
h)
return;
1945 if (
gTws->fBuffer) {
1951 for (
int i = 0; i <
kMAXGC; i++)
1956 if (
gTws->fDoubleBuffer)
1974 unsigned int ww,
hh, border,
depth;
1995 for (i = 0; i <
kMAXGC; i++)
2033 if (
gTws->fBuffer) {
2038 for (
int i = 0; i <
kMAXGC; i++)
2043 if (
gTws->fDoubleBuffer)
2063 if (
gCws->fClip && !
gCws->fIsPixmap && !
gCws->fDoubleBuffer) {
2069 for (
int i = 0; i <
kMAXGC; i++)
2072 for (
int i = 0; i <
kMAXGC; i++)
2106 for (
int i = 0; i <
kMAXGC; i++)
2125 if (
gTws->fClip && !
gTws->fIsPixmap && !
gTws->fDoubleBuffer) {
2131 for (
int i = 0; i <
kMAXGC; i++)
2164 if (values.foreground == values.background)
2191 gTws = pair.second.get();
2223 if (!
gTws->fDoubleBuffer)
return;
2224 gTws->fDoubleBuffer = 0;
2233 if (
gTws->fDoubleBuffer ||
gTws->fIsPixmap)
2235 if (!
gTws->fBuffer) {
2242 for (
int i = 0; i <
kMAXGC; i++)
2244 gTws->fDoubleBuffer = 1;
2362 Warning(
"SetLineType",
"DEPRECATED, use SetAttLine() instead");
2549 for (
int i = 0; i <
kMAXFONT; i++) {
2657 if (
ctxt->fDoubleBuffer) {
2688 std::vector<ULong_t> orgcolors;
2692 if (std::find(orgcolors.begin(), orgcolors.end(),
pixel) == orgcolors.end())
2693 orgcolors.emplace_back(
pixel);
2696 if (orgcolors.empty()) {
2702 if (!
ctxt->fNewColors.empty()) {
2705 ctxt->fNewColors.clear();
2708 std::vector<RXColor>
xcol(orgcolors.size());
2710 for (std::size_t i = 0; i < orgcolors.size(); i++) {
2711 xcol[i].pixel = orgcolors[i];
2720 for (std::size_t i = 0; i < orgcolors.size(); i++) {
2725 Warning(
"SetOpacityW",
"failed to allocate color %hd, %hd, %hd",
2730 ctxt->fNewColors.resize(orgcolors.size());
2732 for (std::size_t i = 0; i < orgcolors.size(); i++)
2733 ctxt->fNewColors[i] =
xcol[i].pixel;
2739 auto iter = std::find(orgcolors.begin(), orgcolors.end(),
pixel);
2740 if (iter != orgcolors.end()) {
2741 auto idx = iter - orgcolors.begin();
2823 buf[
x] = (
unsigned char) idx;
2856 Error(
"WriteGIFW",
"Cannot create image for writing GIF. Try in batch mode.");
2881 Error(
"WriteGIFW",
"Cannot create GIF of image containing more than 256 colors. Try in batch mode.");
2889 for (std::size_t i = 0; i <
ncolors; i++) {
2890 xcol[i].pixel =
gif.orgcolors[i];
2898 for (std::size_t i = 0; i <
ncolors; i++) {
2908 for (std::size_t i = 0; i <
ncolors; i++) {
2922 Error(
"WriteGIFW",
"cannot write file: %s",
name);
2950 id =
gCws->fDrawing;
2954 for (i = 0; i < 256; i++)
nlines[i] = 0;
2991 for (i = 0; i < 256; i++) {
3016 Error(
"ReadGIF",
"unable to open GIF file");
3023 Error(
"ReadGIF",
"unable to open GIF file");
3032 Error(
"ReadGIF",
"unable to allocate array for gif");
3038 Error(
"ReadGIF",
"GIF file read failed");
3052 Error(
"ReadGIF",
"unable to allocate array for image");
3070 for (i = 0; i <
ncolor; i++) {
3080 for (i = 1; i <=
height/2; i++) {
3083 for (k = 0; k <
width; k++) {
3089 PutImage(
offset,-1,x0,
y0,
width,
height,0,0,
width-1,
height-1,
pixArr,
pic);
3147 gCws->fDoubleBuffer = 0;
3148 gCws->fIsPixmap = 1;
3208 ctxt->fillHollow = 0;
3213 ctxt->fillHollow = 1;
3217 ctxt->fillHollow = 0;
3221 if (
ctxt->fillPattern != 0)
3233 ctxt->fillHollow = 1;
3246 if (
ctxt->fAttLine.GetLineStyle() !=
att.GetLineStyle()) {
3247 if (
att.GetLineStyle() <= 1)
3248 ctxt->dashList.clear();
3249 else if (
att.GetLineStyle() == 2)
3250 ctxt->dashList = { 3, 3 };
3251 else if (
att.GetLineStyle() == 3)
3252 ctxt->dashList = { 1, 2 };
3253 else if (
att.GetLineStyle() == 4) {
3254 ctxt->dashList = { 3, 4, 1, 4} ;
3259 ctxt->dashList.resize(
nt);
3267 ctxt->dashLength = 0;
3270 ctxt->dashOffset = 0;
3274 ctxt->lineWidth =
att.GetLineWidth();
3276 if (
ctxt->lineWidth == 1)
3277 ctxt->lineWidth = 0;
3279 if (
ctxt->lineWidth == 0)
3280 ctxt->lineWidth = 1;
3283 if (
ctxt->lineWidth >= 0) {
3291 if (
att.GetLineColor() >= 0) {
3311 (
att.GetMarkerStyle() !=
ctxt->fAttMarker.GetMarkerStyle());
3331 auto &shape =
ctxt->markerShape;
3332 ctxt->markerSize = 0;
3333 ctxt->markerType = 0;
3337 shape[0].x = -
im; shape[0].y = 0;
3338 shape[1].x =
im; shape[1].y = 0;
3339 shape[2].x = 0 ; shape[2].y = -
im;
3340 shape[3].x = 0 ; shape[3].y =
im;
3341 ctxt->markerType = 4;
3345 shape[0].x = -
im; shape[0].y = 0;
3346 shape[1].x =
im; shape[1].y = 0;
3347 shape[2].x = 0 ; shape[2].y = -
im;
3348 shape[3].x = 0 ; shape[3].y =
im;
3350 shape[4].x = -
im; shape[4].y = -
im;
3351 shape[5].x =
im; shape[5].y =
im;
3352 shape[6].x = -
im; shape[6].y =
im;
3353 shape[7].x =
im; shape[7].y = -
im;
3354 ctxt->markerType = 4;
3358 ctxt->markerType = 0;
3364 shape[0].x = -
im; shape[0].y = -
im;
3365 shape[1].x =
im; shape[1].y =
im;
3366 shape[2].x = -
im; shape[2].y =
im;
3367 shape[3].x =
im; shape[3].y = -
im;
3368 ctxt->markerType = 4;
3372 shape[0].x = -1 ; shape[0].y = 0;
3373 shape[1].x = 1 ; shape[1].y = 0;
3374 shape[2].x = 0 ; shape[2].y = -1;
3375 shape[3].x = 0 ; shape[3].y = 1;
3376 ctxt->markerType = 4;
3380 shape[0].x = -1 ; shape[0].y = 1;
3381 shape[1].x = 1 ; shape[1].y = 1;
3382 shape[2].x = -1 ; shape[2].y = 0;
3383 shape[3].x = 1 ; shape[3].y = 0;
3384 shape[4].x = -1 ; shape[4].y = -1;
3385 shape[5].x = 1 ; shape[5].y = -1;
3386 ctxt->markerType = 4;
3390 ctxt->markerType = 1;
3395 shape[0].x = -
im; shape[0].y = -
im;
3396 shape[1].x =
im; shape[1].y = -
im;
3397 shape[2].x =
im; shape[2].y =
im;
3398 shape[3].x = -
im; shape[3].y =
im;
3399 shape[4].x = -
im; shape[4].y = -
im;
3400 ctxt->markerType = 3;
3404 shape[0].x = -
im; shape[0].y =
im;
3405 shape[1].x =
im; shape[1].y =
im;
3406 shape[2].x = 0; shape[2].y = -
im;
3407 shape[3].x = -
im; shape[3].y =
im;
3408 ctxt->markerType = 3;
3412 shape[0].x = 0; shape[0].y =
im;
3413 shape[1].x =
im; shape[1].y = -
im;
3414 shape[2].x = -
im; shape[2].y = -
im;
3415 shape[3].x = 0; shape[3].y =
im;
3416 ctxt->markerType = 3;
3420 shape[0].x = -
im; shape[0].y = -
im;
3421 shape[1].x =
im; shape[1].y = -
im;
3422 shape[2].x =
im; shape[2].y =
im;
3423 shape[3].x = -
im; shape[3].y =
im;
3424 shape[4].x = -
im; shape[4].y = -
im;
3425 ctxt->markerType = 2;
3429 shape[0].x = -
im; shape[0].y =
im;
3430 shape[1].x =
im; shape[1].y =
im;
3431 shape[2].x = 0; shape[2].y = -
im;
3432 shape[3].x = -
im; shape[3].y =
im;
3433 ctxt->markerType = 2;
3438 shape[0].x =-
imx; shape[0].y = 0;
3439 shape[1].x = 0; shape[1].y = -
im;
3440 shape[2].x =
imx; shape[2].y = 0;
3441 shape[3].x = 0; shape[3].y =
im;
3442 shape[4].x =-
imx; shape[4].y = 0;
3443 ctxt->markerType = 2;
3448 shape[0].x = -
im; shape[0].y =-
imx;
3449 shape[1].x =-
imx; shape[1].y =-
imx;
3450 shape[2].x =-
imx; shape[2].y = -
im;
3451 shape[3].x =
imx; shape[3].y = -
im;
3452 shape[4].x =
imx; shape[4].y =-
imx;
3453 shape[5].x =
im; shape[5].y =-
imx;
3454 shape[6].x =
im; shape[6].y =
imx;
3455 shape[7].x =
imx; shape[7].y =
imx;
3456 shape[8].x =
imx; shape[8].y =
im;
3457 shape[9].x =-
imx; shape[9].y =
im;
3458 shape[10].x=-
imx; shape[10].y=
imx;
3459 shape[11].x= -
im; shape[11].y=
imx;
3460 shape[12].x= -
im; shape[12].y=-
imx;
3461 ctxt->markerType = 2;
3469 shape[0].x = -
im; shape[0].y =
im4;
3470 shape[1].x =-
im2; shape[1].y =-
im1;
3471 shape[2].x =-
im3; shape[2].y = -
im;
3472 shape[3].x = 0; shape[3].y =-
im2;
3473 shape[4].x =
im3; shape[4].y = -
im;
3474 shape[5].x =
im2; shape[5].y =-
im1;
3475 shape[6].x =
im; shape[6].y =
im4;
3476 shape[7].x =
im4; shape[7].y =
im4;
3477 shape[8].x = 0; shape[8].y =
im;
3478 shape[9].x =-
im4; shape[9].y =
im4;
3479 shape[10].x= -
im; shape[10].y=
im4;
3480 ctxt->markerType = 3;
3488 shape[0].x = -
im; shape[0].y =
im4;
3489 shape[1].x =-
im2; shape[1].y =-
im1;
3490 shape[2].x =-
im3; shape[2].y = -
im;
3491 shape[3].x = 0; shape[3].y =-
im2;
3492 shape[4].x =
im3; shape[4].y = -
im;
3493 shape[5].x =
im2; shape[5].y =-
im1;
3494 shape[6].x =
im; shape[6].y =
im4;
3495 shape[7].x =
im4; shape[7].y =
im4;
3496 shape[8].x = 0; shape[8].y =
im;
3497 shape[9].x =-
im4; shape[9].y =
im4;
3498 shape[10].x= -
im; shape[10].y=
im4;
3499 ctxt->markerType = 2;
3503 shape[0].x = 0; shape[0].y =
im;
3504 shape[1].x =
im; shape[1].y = -
im;
3505 shape[2].x = -
im; shape[2].y = -
im;
3506 shape[3].x = 0; shape[3].y =
im;
3507 ctxt->markerType = 2;
3512 shape[0].x =-
imx; shape[0].y = 0;
3513 shape[1].x = 0; shape[1].y = -
im;
3514 shape[2].x =
imx; shape[2].y = 0;
3515 shape[3].x = 0; shape[3].y =
im;
3516 shape[4].x =-
imx; shape[4].y = 0;
3517 ctxt->markerType = 3;
3522 shape[0].x = -
im; shape[0].y =-
imx;
3523 shape[1].x =-
imx; shape[1].y =-
imx;
3524 shape[2].x =-
imx; shape[2].y = -
im;
3525 shape[3].x =
imx; shape[3].y = -
im;
3526 shape[4].x =
imx; shape[4].y =-
imx;
3527 shape[5].x =
im; shape[5].y =-
imx;
3528 shape[6].x =
im; shape[6].y =
imx;
3529 shape[7].x =
imx; shape[7].y =
imx;
3530 shape[8].x =
imx; shape[8].y =
im;
3531 shape[9].x =-
imx; shape[9].y =
im;
3532 shape[10].x=-
imx; shape[10].y=
imx;
3533 shape[11].x= -
im; shape[11].y=
imx;
3534 shape[12].x= -
im; shape[12].y=-
imx;
3535 ctxt->markerType = 3;
3539 shape[0].x =-
im; shape[0].y = 0;
3540 shape[1].x = 0; shape[1].y = -
im;
3541 shape[2].x =
im; shape[2].y = 0;
3542 shape[3].x = 0; shape[3].y =
im;
3543 shape[4].x =-
im; shape[4].y = 0;
3544 shape[5].x =
im; shape[5].y = 0;
3545 shape[6].x = 0; shape[6].y =
im;
3546 shape[7].x = 0; shape[7].y =-
im;
3547 ctxt->markerType = 2;
3551 shape[0].x = -
im; shape[0].y = -
im;
3552 shape[1].x =
im; shape[1].y = -
im;
3553 shape[2].x =
im; shape[2].y =
im;
3554 shape[3].x = -
im; shape[3].y =
im;
3555 shape[4].x = -
im; shape[4].y = -
im;
3556 shape[5].x =
im; shape[5].y =
im;
3557 shape[6].x = -
im; shape[6].y =
im;
3558 shape[7].x =
im; shape[7].y = -
im;
3559 ctxt->markerType = 2;
3564 shape[0].x = 0; shape[0].y = 0;
3565 shape[1].x =-
im2; shape[1].y =
im;
3566 shape[2].x =
im2; shape[2].y =
im;
3567 shape[3].x = 0; shape[3].y = 0;
3568 shape[4].x =-
im2; shape[4].y = -
im;
3569 shape[5].x = -
im; shape[5].y = 0;
3570 shape[6].x = 0; shape[6].y = 0;
3571 shape[7].x =
im; shape[7].y = 0;
3572 shape[8].x =
im2; shape[8].y = -
im;
3573 shape[9].x = 0; shape[9].y = 0;
3574 ctxt->markerType = 2;
3579 shape[0].x = -
im; shape[0].y = 0;
3580 shape[1].x = -
im; shape[1].y =-
im2;
3581 shape[2].x =-
im2; shape[2].y = -
im;
3582 shape[3].x =
im2; shape[3].y = -
im;
3583 shape[4].x =
im; shape[4].y =-
im2;
3584 shape[5].x =
im; shape[5].y =
im2;
3585 shape[6].x =
im2; shape[6].y =
im;
3586 shape[7].x =-
im2; shape[7].y =
im;
3587 shape[8].x = -
im; shape[8].y =
im2;
3588 shape[9].x = -
im; shape[9].y = 0;
3589 shape[10].x =
im; shape[10].y = 0;
3590 shape[11].x = 0; shape[11].y = 0;
3591 shape[12].x = 0; shape[12].y = -
im;
3592 shape[13].x = 0; shape[13].y =
im;
3593 shape[14].x = 0; shape[14].y = 0;
3594 ctxt->markerType = 2;
3599 shape[0].x = 0; shape[0].y = 0;
3600 shape[1].x =-
im2; shape[1].y =
im;
3601 shape[2].x =
im2; shape[2].y =
im;
3602 shape[3].x = 0; shape[3].y = 0;
3603 shape[4].x =-
im2; shape[4].y = -
im;
3604 shape[5].x = -
im; shape[5].y = 0;
3605 shape[6].x = 0; shape[6].y = 0;
3606 shape[7].x =
im; shape[7].y = 0;
3607 shape[8].x =
im2; shape[8].y = -
im;
3608 ctxt->markerType = 3;
3613 shape[0].x = 0; shape[0].y = 0;
3614 shape[1].x =
im2; shape[1].y =
im;
3615 shape[2].x =
im; shape[2].y =
im2;
3616 shape[3].x = 0; shape[3].y = 0;
3617 shape[4].x =
im; shape[4].y = -
im2;
3618 shape[5].x =
im2; shape[5].y = -
im;
3619 shape[6].x = 0; shape[6].y = 0;
3620 shape[7].x = -
im2; shape[7].y = -
im;
3621 shape[8].x = -
im; shape[8].y = -
im2;
3622 shape[9].x = 0; shape[9].y = 0;
3623 shape[10].x = -
im; shape[10].y =
im2;
3624 shape[11].x = -
im2; shape[11].y =
im;
3625 shape[12].x = 0; shape[12].y = 0;
3626 ctxt->markerType = 2;
3631 shape[0].x = 0; shape[0].y = 0;
3632 shape[1].x =
im2; shape[1].y =
im;
3633 shape[2].x =
im; shape[2].y =
im2;
3634 shape[3].x = 0; shape[3].y = 0;
3635 shape[4].x =
im; shape[4].y = -
im2;
3636 shape[5].x =
im2; shape[5].y = -
im;
3637 shape[6].x = 0; shape[6].y = 0;
3638 shape[7].x = -
im2; shape[7].y = -
im;
3639 shape[8].x = -
im; shape[8].y = -
im2;
3640 shape[9].x = 0; shape[9].y = 0;
3641 shape[10].x = -
im; shape[10].y =
im2;
3642 shape[11].x = -
im2; shape[11].y =
im;
3643 shape[12].x = 0; shape[12].y = 0;
3644 ctxt->markerType = 3;
3649 shape[0].x= 0; shape[0].y=
im;
3650 shape[1].x= -
imx; shape[1].y=
imx;
3651 shape[2].x = -
im; shape[2].y = 0;
3652 shape[3].x = -
imx; shape[3].y = -
imx;
3653 shape[4].x = 0; shape[4].y = -
im;
3654 shape[5].x =
imx; shape[5].y = -
imx;
3655 shape[6].x =
im; shape[6].y = 0;
3656 shape[7].x=
imx; shape[7].y=
imx;
3657 shape[8].x= 0; shape[8].y=
im;
3658 ctxt->markerType = 2;
3663 shape[0].x = 0; shape[0].y =
im;
3664 shape[1].x = -
imx; shape[1].y =
imx;
3665 shape[2].x = -
im; shape[2].y = 0;
3666 shape[3].x = -
imx; shape[3].y = -
imx;
3667 shape[4].x = 0; shape[4].y = -
im;
3668 shape[5].x =
imx; shape[5].y = -
imx;
3669 shape[6].x =
im; shape[6].y = 0;
3670 shape[7].x =
imx; shape[7].y =
imx;
3671 shape[8].x = 0; shape[8].y =
im;
3672 ctxt->markerType = 3;
3677 shape[0].x = 0; shape[0].y = 0;
3678 shape[1].x =
im2; shape[1].y =
im;
3679 shape[2].x = -
im2; shape[2].y =
im;
3680 shape[3].x =
im2; shape[3].y = -
im;
3681 shape[4].x = -
im2; shape[4].y = -
im;
3682 shape[5].x = 0; shape[5].y = 0;
3683 shape[6].x =
im; shape[6].y =
im2;
3684 shape[7].x =
im; shape[7].y = -
im2;
3685 shape[8].x = -
im; shape[8].y =
im2;
3686 shape[9].x = -
im; shape[9].y = -
im2;
3687 shape[10].x = 0; shape[10].y = 0;
3688 ctxt->markerType = 2;
3694 shape[0].x =
im0; shape[0].y =
im0;
3695 shape[1].x =
im2; shape[1].y =
im;
3696 shape[2].x = -
im2; shape[2].y =
im;
3697 shape[3].x = -
im0; shape[3].y =
im0;
3698 shape[4].x = -
im; shape[4].y =
im2;
3699 shape[5].x = -
im; shape[5].y = -
im2;
3700 shape[6].x = -
im0; shape[6].y = -
im0;
3701 shape[7].x = -
im2; shape[7].y = -
im;
3702 shape[8].x =
im2; shape[8].y = -
im;
3703 shape[9].x =
im0; shape[9].y = -
im0;
3704 shape[10].x =
im; shape[10].y = -
im2;
3705 shape[11].x =
im; shape[11].y =
im2;
3706 shape[12].x =
im0; shape[12].y =
im0;
3707 ctxt->markerType = 3;
3712 shape[0].x = 0; shape[0].y =
im2;
3713 shape[1].x = -
im2; shape[1].y =
im;
3714 shape[2].x = -
im; shape[2].y =
im2;
3715 shape[3].x = -
im2; shape[3].y = 0;
3716 shape[4].x = -
im; shape[4].y = -
im2;
3717 shape[5].x = -
im2; shape[5].y = -
im;
3718 shape[6].x = 0; shape[6].y = -
im2;
3719 shape[7].x =
im2; shape[7].y = -
im;
3720 shape[8].x =
im; shape[8].y = -
im2;
3721 shape[9].x =
im2; shape[9].y = 0;
3722 shape[10].x =
im; shape[10].y =
im2;
3723 shape[11].x =
im2; shape[11].y =
im;
3724 shape[12].x = 0; shape[12].y =
im2;
3725 ctxt->markerType = 2;
3730 shape[0].x = 0; shape[0].y =
im2;
3731 shape[1].x = -
im2; shape[1].y =
im;
3732 shape[2].x = -
im; shape[2].y =
im2;
3733 shape[3].x = -
im2; shape[3].y = 0;
3734 shape[4].x = -
im; shape[4].y = -
im2;
3735 shape[5].x = -
im2; shape[5].y = -
im;
3736 shape[6].x = 0; shape[6].y = -
im2;
3737 shape[7].x =
im2; shape[7].y = -
im;
3738 shape[8].x =
im; shape[8].y = -
im2;
3739 shape[9].x =
im2; shape[9].y = 0;
3740 shape[10].x =
im; shape[10].y =
im2;
3741 shape[11].x =
im2; shape[11].y =
im;
3742 shape[12].x = 0; shape[12].y =
im2;
3743 ctxt->markerType = 3;
3748 shape[0].x = 0; shape[0].y =
im2*1.005;
3749 shape[1].x = -
im2; shape[1].y =
im;
3750 shape[2].x = -
im; shape[2].y =
im2;
3751 shape[3].x = -
im2; shape[3].y = 0;
3752 shape[4].x = -
im; shape[4].y = -
im2;
3753 shape[5].x = -
im2; shape[5].y = -
im;
3754 shape[6].x = 0; shape[6].y = -
im2;
3755 shape[7].x =
im2; shape[7].y = -
im;
3756 shape[8].x =
im; shape[8].y = -
im2;
3757 shape[9].x =
im2; shape[9].y = 0;
3758 shape[10].x =
im; shape[10].y =
im2;
3759 shape[11].x =
im2; shape[11].y =
im;
3760 shape[12].x = 0; shape[12].y =
im2*0.995;
3761 shape[13].x =
im2*0.995; shape[13].y = 0;
3762 shape[14].x = 0; shape[14].y = -
im2*0.995;
3763 shape[15].x = -
im2*0.995; shape[15].y = 0;
3764 shape[16].x = 0; shape[16].y =
im2*0.995;
3765 ctxt->markerType = 3;
3770 shape[0].x =-
imx; shape[0].y =-
imx*1.005;
3771 shape[1].x =-
imx; shape[1].y = -
im;
3772 shape[2].x =
imx; shape[2].y = -
im;
3773 shape[3].x =
imx; shape[3].y =-
imx;
3774 shape[4].x =
im; shape[4].y =-
imx;
3775 shape[5].x =
im; shape[5].y =
imx;
3776 shape[6].x =
imx; shape[6].y =
imx;
3777 shape[7].x =
imx; shape[7].y =
im;
3778 shape[8].x =-
imx; shape[8].y =
im;
3779 shape[9].x =-
imx; shape[9].y =
imx;
3780 shape[10].x = -
im; shape[10].y =
imx;
3781 shape[11].x = -
im; shape[11].y =-
imx;
3782 shape[12].x =-
imx; shape[12].y =-
imx*0.995;
3783 shape[13].x =-
imx; shape[13].y =
imx;
3784 shape[14].x =
imx; shape[14].y =
imx;
3785 shape[15].x =
imx; shape[15].y =-
imx;
3786 shape[16].x =-
imx; shape[16].y =-
imx*1.005;
3787 ctxt->markerType = 3;
3791 ctxt->markerType = 0;
3792 ctxt->markerSize = 0;
3860 Error(
"SetAttText",
"cannot get GC values");
3892 for (
int i = 0; i <
kMAXGC; i++)
Handle_t WinContext_t
Window drawing context.
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)
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.
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 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 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 UChar_t len
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 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 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
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.
static ULong_t gKeybdMask
void XRotSetMagnification(float)
Set the font magnification factor for all subsequent operations.
static Cursor gNullCursor
const char null_cursor_bits[]
int XRotDrawString(Display *, XFontStruct *, float, Drawable, GC, int, int, char *)
A front end to XRotPaintAlignedString: -no alignment, no background.
const Int_t kBIGGEST_RGB_VALUE
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
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 struct @55 gFont[kMAXFONT]
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_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
const_iterator begin() const
const_iterator end() const
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the 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)
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
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.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual void SetTextSize(Float_t tsize=1)
Set the 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 DrawBoxW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override
Draw a box on specified window.
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.
std::unordered_map< Int_t, std::unique_ptr< XWindow_t > > fWindows
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.
WinContext_t GetWindowContext(Int_t wid) override
Returns window context for specified window id Window context is valid until window not closed or des...
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,...
Int_t WriteGIFW(WinContext_t wctxt, const char *name) override
Writes the specified window into GIF file.
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.
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 DrawFillAreaW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Fill area described by polygon on specified window.
void SetAttText(WinContext_t wctxt, const TAttText &att) override
Set text attributes for specified window.
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 SetOpacityW(WinContext_t wctxt, Int_t percent) override
Set opacity of a specified window.
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 DrawTextW(WinContext_t wctxt, 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 on specified window.
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.
Style_t GetLineStyle() const override
Return current line style.
~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 CopyPixmapW(WinContext_t wctxt, Int_t wid, Int_t xpos, Int_t ypos) override
Copy the pixmap wid at the position xpos, ypos in the specified window.
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 DrawPolyLineW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draw a line through all points on specified window.
void SetInput(Int_t inp)
Set input on or off.
void GetPlanes(Int_t &nplanes) override
Get maximum number of planes.
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 selected window.
Style_t GetFillStyle() const override
Return current fill style.
void DrawPolyMarkerW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draw n markers with the current attributes at position x, y on specified 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.
void * GetGCW(WinContext_t wctxt, Int_t which) const
Return X11 Graphics Context for specified window context.
void SetAttMarker(WinContext_t wctxt, const TAttMarker &att) override
Set marker attributes for specified window.
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 UpdateWindowW(WinContext_t wctxt, Int_t mode) override
Update display for specified window.
void CloseWindow() override
Delete current window.
void SetMarkerSize(Float_t markersize) override
Set marker size index.
void SetAttLine(WinContext_t wctxt, const TAttLine &att) override
Set line attributes for specified window.
Drawable fVisRootWin
Root window with fVisual to be used to create GC's and XImages.
void SetDoubleBufferON() override
Turn double buffer mode on.
void SetColor(XWindow_t *ctxt, void *gc, Int_t ci)
Set the foreground color in GC.
TExMap * fColors
Hash list of colors.
void DrawLinesSegments(Int_t n, TPoint *xy) override
Draws N segments between provided points.
void SetAttFill(WinContext_t wctxt, const TAttFill &att) override
Set fill attributes for specified window.
void SetDrawModeW(WinContext_t wctxt, EDrawMode mode) override
Set window draw mode.
Int_t fRedDiv
Red value divider, -1 if no TrueColor visual.
Int_t fDepth
Number of color planes.
Color_t GetFillColor() const override
Return current fill color.
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.
Window_t GetWindow(WinContext_t wctxt) const
Return X11 window for specified window context.
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.
EDrawMode GetDrawModeW(WinContext_t wctxt) override
Returns window draw mode.
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 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.
EAlign GetTextAlignW(WinContext_t wctxt) const
Return text align value for specified window context.
void DrawLineW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2) override
Draw a line on specified window.
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.
void DrawLinesSegmentsW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draws N segments between provided points on specified 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 ClearWindowW(WinContext_t wctxt) override
Clear specified window.
RVisual * fVisual
Pointer to visual used by all windows.
Width_t GetLineWidth() const override
Return current line width.
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.
void RemoveWindow(ULong_t qwid) override
Remove a window created by Qt (like CloseWindow()).
Int_t RequestString(Int_t x, Int_t y, char *text) override
Request a string.
void SetLineWidth(Width_t width) override
Set line width.
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.
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()).
Int_t AddWindowHandle()
Add new window handle Only for private usage.
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.
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.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
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,...
Helper class to extract pixel information from XImage for store in the GIF.
TX11GifEncode(XImage *image)
void get_scline(int y, int width, unsigned char *buf) override
std::vector< ULong_t > orgcolors
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
TAttText fAttText
current text attributes
EAlign textAlign
selected text align
Int_t fClip
1 if the clipping is on
Drawable fWindow
X11 window.
Int_t lineWidth
current line width
Int_t dashOffset
current dash offset
Int_t fillFasi
fasi parameter for fill pattern
Drawable fDrawing
drawing area, equal to window or buffer
Int_t markerLineWidth
line width used for marker
Int_t fDoubleBuffer
1 if the double buffer is on, 0 if not
std::vector< char > dashList
X11 array for dashes.
XFontStruct * textFont
selected text font
UInt_t fHeight
height of the window
Int_t fIsPixmap
1 if pixmap, 0 if not
Int_t fillHollow
Flag if fill style is hollow.
std::vector< XPoint > markerShape
marker shape points
UInt_t fWidth
width of the window
TVirtualX::EDrawMode drawMode
current draw mode
UInt_t fHclip
height of the clipping rectangle
Int_t dashLength
total length of dashes
Bool_t fShared
notify when window is shared
Drawable fBuffer
pixmap used for double buffer
GdkGC * fGClist[kMAXGC]
array of GC objects for concrete window
Int_t markerSize
size of simple markers
GdkLineStyle lineStyle
current line style
TAttLine fAttLine
current line attributes
std::vector< ULong_t > fNewColors
extra image colors created for transparency (after processing)
Int_t markerType
4 differen kinds of marker
TAttMarker fAttMarker
current marker attribute
GdkPixmap * fillPattern
current fill pattern
Int_t fXclip
x coordinate of the clipping rectangle
TAttFill fAttFill
current fill attributes
UInt_t fWclip
width of the clipping rectangle
Int_t fYclip
y coordinate of the clipping rectangle