52#include <X11/cursorfont.h>
53#include <X11/keysym.h>
62# include <sys/socket.h>
77 int,
int,
char*,
int);
2030x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2040x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2050x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
401 for (
Int_t i = 0; i < ncolors; i++) {
434 if (!
ctxt->fIsPixmap && !
ctxt->fDoubleBuffer) {
462 if (
gCws->fNewColors) {
465 delete []
gCws->fNewColors;
466 gCws->fNewColors =
nullptr;
469 if (!
gCws->fShared) {
478 for (
int i = 0; i <
kMAXGC; ++i)
481 if (
gCws->fillPattern != 0) {
483 gCws->fillPattern = 0;
489 if (iter->second.get() ==
gCws) {
496 Fatal(
"CloseWindow",
"Not found gCws in list of windows");
500 if (iter->second && iter->second->fOpen) {
501 gCws = iter->second.get();
580 for (i = 0; i <
nx; i++) {
582 for (
j = 0;
j <
ny;
j++) {
617 if (
ctxt->fillHollow)
699 for (
int i = 1; i <
n; i++) {
706 ctxt->dashOffset %=
ctxt->dashLength;
779 if ((
ctxt->markerShape.size() == 0) && (
ctxt->markerSize <= 0)) {
780 const int kNMAX = 1000000;
782 for (
int it=0;it<=
nt;it++) {
790 int r =
ctxt->markerSize / 2;
791 auto &shape =
ctxt->markerShape;
793 for (
int m = 0;
m <
n;
m++) {
794 if (
ctxt->markerType == 0) {
798 }
else if (
ctxt->markerType == 1) {
803 for (
size_t i = 0; i < shape.size(); i++) {
804 shape[i].x +=
xyp[
m].x;
805 shape[i].y +=
xyp[
m].y;
807 switch(
ctxt->markerType) {
821 (
XSegment *) shape.data(), shape.size()/2);
824 for (
size_t i = 0; i < shape.size(); i++) {
825 shape[i].x -=
xyp[
m].x;
826 shape[i].y -=
xyp[
m].y;
883 if (!
text || !
ctxt->textFont ||
ctxt->fAttText.GetTextSize() < 0)
921 {
nullptr, 0 , 0 , 24 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
922 {
nullptr, 0 , 0 , 32 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
923 {
nullptr, 0 , 0 , 16 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
924 {
nullptr, 0 , 0 , 15 ,
TrueColor , 0 , 0 , 0 , 0 , 0 },
926 {
nullptr, 0 , 0 , 24 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
927 {
nullptr, 0 , 0 , 32 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
928 {
nullptr, 0 , 0 , 16 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
929 {
nullptr, 0 , 0 , 15 ,
DirectColor, 0 , 0 , 0 , 0 , 0 },
930 {
nullptr, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 },
960 Printf(
"Selected visual 0x%lx: depth %d, class %d, colormap: %s",
1005 attr.override_redirect = True;
1064 Error(
"GetGC",
"trying to get illegal GC (which = %d)",
which);
1068 Error(
"GetGC",
"No current window selected");
1092 Error(
"GetGC",
"No window context specified");
1097 Error(
"GetGC",
"trying to get illegal GC (which = %d)",
which);
1122 return gTws->fDoubleBuffer;
1145 unsigned int border,
depth;
1204 }
else if (
index == 1) {
1256 if (!
gTws->fOpen)
return;
1319 gFont[i].id =
nullptr;
1339 Warning(
"OpenDisplay",
"no default font loaded");
1380 if ((
fVisual->blue_mask >> i) == 1) {
1388 if ((
fVisual->green_mask >> i) == 1) {
1396 if ((
fVisual->red_mask >> i) == 1) {
1417 if (!pair.second->fOpen) {
1418 pair.second->fOpen = 1;
1421 if (pair.first >
maxid)
1429 for (
int id = 1;
id <
maxid;
id++) {
1449 Error(
"AddWindowHandle",
"cannot get GC values");
1472 unsigned int ww,
hh, border,
depth;
1483 for (
int i = 0; i <
kMAXGC; i++) {
1495 gCws->fDoubleBuffer = 0;
1496 gCws->fIsPixmap = 1;
1500 gCws->fNewColors =
nullptr;
1527 gCws->fDoubleBuffer = 0;
1537 attributes.backing_store = Always;
1558 gCws->fDoubleBuffer = 0;
1559 gCws->fIsPixmap = 0;
1563 gCws->fNewColors =
nullptr;
1577 gCws->fDoubleBuffer = 0;
1584 gCws->fDoubleBuffer = 0;
1585 gCws->fIsPixmap = 0;
1589 gCws->fNewColors =
nullptr;
1658 static int xloc = 0;
1659 static int yloc = 0;
1660 static int xlocp = 0;
1661 static int ylocp = 0;
1760 xloc =
event.xbutton.x;
1761 yloc =
event.xbutton.y;
1763 switch (event.type) {
1778 xlocp =
event.xbutton.x;
1779 ylocp =
event.xbutton.y;
1787 xlocp =
event.xbutton.x;
1788 ylocp =
event.xbutton.y;
1795 xlocp =
event.xbutton.x;
1796 ylocp =
event.xbutton.y;
1803 xlocp =
event.xbutton.x;
1804 ylocp =
event.xbutton.y;
1818 x =
event.xbutton.x;
1819 y =
event.xbutton.y;
1872 switch (event.type) {
1898 for (i =
nt - 1; i >
pt; i--)
1912 for (i =
pt; i <
nt; i++)
1931 for (i =
pt; i <
nt; i++)
1949 for (i =
pt; i <
nt; i++)
1995 if (!
gTws->fOpen)
return;
1998 if (
gTws->fWidth ==
w &&
gTws->fHeight ==
h)
return;
2002 if (
gTws->fBuffer) {
2008 for (
int i = 0; i <
kMAXGC; i++) {
2015 if (
gTws->fDoubleBuffer)
2033 unsigned int ww,
hh, border,
depth;
2054 for (i = 0; i <
kMAXGC; i++) {
2094 if (
gTws->fBuffer) {
2099 for (
int i = 0; i <
kMAXGC; i++) {
2106 if (
gTws->fDoubleBuffer)
2126 if (
gCws->fClip && !
gCws->fIsPixmap && !
gCws->fDoubleBuffer) {
2132 for (
int i = 0; i <
kMAXGC; i++) {
2137 for (
int i = 0; i <
kMAXGC; i++) {
2173 for (
int i = 0; i <
kMAXGC; i++) {
2194 if (
gTws->fClip && !
gTws->fIsPixmap && !
gTws->fDoubleBuffer) {
2200 for (
int i = 0; i <
kMAXGC; i++) {
2235 if (values.foreground == values.background)
2262 gTws = pair.second.get();
2294 if (!
gTws->fDoubleBuffer)
return;
2295 gTws->fDoubleBuffer = 0;
2304 if (
gTws->fDoubleBuffer ||
gTws->fIsPixmap)
2306 if (!
gTws->fBuffer) {
2313 for (
int i = 0; i <
kMAXGC; i++) {
2317 gTws->fDoubleBuffer = 1;
2337 for (
int i = 0; i <
kMAXGC; i++) {
2344 for (
int i = 0; i <
kMAXGC; i++) {
2351 for (
int i = 0; i <
kMAXGC; i++) {
3159 if (
gCws->fNewColors) {
3185 if (
gCws->fNewColors) {
3223 for (
int i = 0; i < ncolors; i++)
3241 if (ncolors == 0)
return;
3246 for (i = 0; i < ncolors; i++) {
3256 for (i = 0; i < ncolors; i++) {
3257 val =
xcol[i].red + add;
3260 val =
xcol[i].green + add;
3263 val =
xcol[i].blue + add;
3267 Warning(
"MakeOpaqueColors",
"failed to allocate color %hd, %hd, %hd",
3273 gCws->fNcolors = ncolors;
3275 for (i = 0; i < ncolors; i++)
3276 gCws->fNewColors[i] =
xcol[i].pixel;
3286 for (
int i = 0; i < ncolors; i++)
3289 Error(
"FindColor",
"did not find color, should never happen!");
3441 for (
int i = 0; i <
kMAXFONT; i++) {
3549 if (
ctxt->fDoubleBuffer) {
3619 for (
int i = 0; i <
width; i++)
3658 for (i = 0; i < ncolors; i++) {
3669 B =
new Int_t[ncolors];
3671 for (i = 0; i < ncolors; i++) {
3673 G[i] =
xcol[i].green;
3674 B[i] =
xcol[i].blue;
3715 Error(
"WriteGIF",
"Cannot create GIF of image containing more than 256 colors. Try in batch mode.");
3723 for (i = 0; i <
ncol; i++) {
3732 for (i = 0; i <
ncol; i++) {
3747 Error(
"WriteGIF",
"cannot write file: %s",
name);
3775 id =
gCws->fDrawing;
3779 for (i = 0; i < 256; i++)
nlines[i] = 0;
3816 for (i = 0; i < 256; i++) {
3840 fd =
fopen(file,
"r");
3842 Error(
"ReadGIF",
"unable to open GIF file");
3849 Error(
"ReadGIF",
"unable to open GIF file");
3858 Error(
"ReadGIF",
"unable to allocate array for gif");
3864 Error(
"ReadGIF",
"GIF file read failed");
3878 Error(
"ReadGIF",
"unable to allocate array for image");
3894 for (i = 0; i <
ncolor; i++) {
3904 for (i = 1; i <=
height/2; i++) {
3907 for (k = 0; k <
width; k++) {
3912 PutImage(
offset,-1,x0,
y0,
width,
height,0,0,
width-1,
height-1,
pixArr,
pic);
3919 else if (
gCws->fDrawing)
3969 gCws->fDoubleBuffer = 0;
3970 gCws->fIsPixmap = 1;
3974 gCws->fNewColors =
nullptr;
4023 ctxt->fillHollow = 0;
4028 ctxt->fillHollow = 1;
4032 ctxt->fillHollow = 0;
4036 if (
ctxt->fillPattern != 0)
4048 ctxt->fillHollow = 1;
4058 if (
ctxt->fAttLine.GetLineStyle() !=
att.GetLineStyle()) {
4059 if (
att.GetLineStyle() <= 1)
4060 ctxt->dashList.clear();
4061 else if (
att.GetLineStyle() == 2)
4062 ctxt->dashList = { 3, 3 };
4063 else if (
att.GetLineStyle() == 3)
4064 ctxt->dashList = { 1, 2 };
4065 else if (
att.GetLineStyle() == 4) {
4066 ctxt->dashList = { 3, 4, 1, 4} ;
4071 ctxt->dashList.resize(
nt);
4079 ctxt->dashLength = 0;
4082 ctxt->dashOffset = 0;
4086 if (
ctxt->fAttLine.GetLineWidth() !=
att.GetLineWidth()) {
4087 ctxt->lineWidth =
att.GetLineWidth();
4089 if (
ctxt->lineWidth == 1)
4090 ctxt->lineWidth = 0;
4092 if (
ctxt->lineWidth == 0)
4093 ctxt->lineWidth = 1;
4097 if (
ctxt->lineWidth >= 0) {
4105 if (
att.GetLineColor() >= 0) {
4122 (
att.GetMarkerStyle() !=
ctxt->fAttMarker.GetMarkerStyle());
4142 auto &shape =
ctxt->markerShape;
4143 ctxt->markerSize = 0;
4144 ctxt->markerType = 0;
4148 shape[0].x = -
im; shape[0].y = 0;
4149 shape[1].x =
im; shape[1].y = 0;
4150 shape[2].x = 0 ; shape[2].y = -
im;
4151 shape[3].x = 0 ; shape[3].y =
im;
4152 ctxt->markerType = 4;
4156 shape[0].x = -
im; shape[0].y = 0;
4157 shape[1].x =
im; shape[1].y = 0;
4158 shape[2].x = 0 ; shape[2].y = -
im;
4159 shape[3].x = 0 ; shape[3].y =
im;
4161 shape[4].x = -
im; shape[4].y = -
im;
4162 shape[5].x =
im; shape[5].y =
im;
4163 shape[6].x = -
im; shape[6].y =
im;
4164 shape[7].x =
im; shape[7].y = -
im;
4165 ctxt->markerType = 4;
4168 ctxt->markerType = 0;
4174 shape[0].x = -
im; shape[0].y = -
im;
4175 shape[1].x =
im; shape[1].y =
im;
4176 shape[2].x = -
im; shape[2].y =
im;
4177 shape[3].x =
im; shape[3].y = -
im;
4178 ctxt->markerType = 4;
4182 shape[0].x = -1 ; shape[0].y = 0;
4183 shape[1].x = 1 ; shape[1].y = 0;
4184 shape[2].x = 0 ; shape[2].y = -1;
4185 shape[3].x = 0 ; shape[3].y = 1;
4186 ctxt->markerType = 4;
4190 shape[0].x = -1 ; shape[0].y = 1;
4191 shape[1].x = 1 ; shape[1].y = 1;
4192 shape[2].x = -1 ; shape[2].y = 0;
4193 shape[3].x = 1 ; shape[3].y = 0;
4194 shape[4].x = -1 ; shape[4].y = -1;
4195 shape[5].x = 1 ; shape[5].y = -1;
4196 ctxt->markerType = 4;
4199 ctxt->markerType = 1;
4204 shape[0].x = -
im; shape[0].y = -
im;
4205 shape[1].x =
im; shape[1].y = -
im;
4206 shape[2].x =
im; shape[2].y =
im;
4207 shape[3].x = -
im; shape[3].y =
im;
4208 shape[4].x = -
im; shape[4].y = -
im;
4209 ctxt->markerType = 3;
4213 shape[0].x = -
im; shape[0].y =
im;
4214 shape[1].x =
im; shape[1].y =
im;
4215 shape[2].x = 0; shape[2].y = -
im;
4216 shape[3].x = -
im; shape[3].y =
im;
4217 ctxt->markerType = 3;
4221 shape[0].x = 0; shape[0].y =
im;
4222 shape[1].x =
im; shape[1].y = -
im;
4223 shape[2].x = -
im; shape[2].y = -
im;
4224 shape[3].x = 0; shape[3].y =
im;
4225 ctxt->markerType = 3;
4229 shape[0].x = -
im; shape[0].y = -
im;
4230 shape[1].x =
im; shape[1].y = -
im;
4231 shape[2].x =
im; shape[2].y =
im;
4232 shape[3].x = -
im; shape[3].y =
im;
4233 shape[4].x = -
im; shape[4].y = -
im;
4234 ctxt->markerType = 2;
4238 shape[0].x = -
im; shape[0].y =
im;
4239 shape[1].x =
im; shape[1].y =
im;
4240 shape[2].x = 0; shape[2].y = -
im;
4241 shape[3].x = -
im; shape[3].y =
im;
4242 ctxt->markerType = 2;
4247 shape[0].x =-
imx; shape[0].y = 0;
4248 shape[1].x = 0; shape[1].y = -
im;
4249 shape[2].x =
imx; shape[2].y = 0;
4250 shape[3].x = 0; shape[3].y =
im;
4251 shape[4].x =-
imx; shape[4].y = 0;
4252 ctxt->markerType = 2;
4257 shape[0].x = -
im; shape[0].y =-
imx;
4258 shape[1].x =-
imx; shape[1].y =-
imx;
4259 shape[2].x =-
imx; shape[2].y = -
im;
4260 shape[3].x =
imx; shape[3].y = -
im;
4261 shape[4].x =
imx; shape[4].y =-
imx;
4262 shape[5].x =
im; shape[5].y =-
imx;
4263 shape[6].x =
im; shape[6].y =
imx;
4264 shape[7].x =
imx; shape[7].y =
imx;
4265 shape[8].x =
imx; shape[8].y =
im;
4266 shape[9].x =-
imx; shape[9].y =
im;
4267 shape[10].x=-
imx; shape[10].y=
imx;
4268 shape[11].x= -
im; shape[11].y=
imx;
4269 shape[12].x= -
im; shape[12].y=-
imx;
4270 ctxt->markerType = 2;
4278 shape[0].x = -
im; shape[0].y =
im4;
4279 shape[1].x =-
im2; shape[1].y =-
im1;
4280 shape[2].x =-
im3; shape[2].y = -
im;
4281 shape[3].x = 0; shape[3].y =-
im2;
4282 shape[4].x =
im3; shape[4].y = -
im;
4283 shape[5].x =
im2; shape[5].y =-
im1;
4284 shape[6].x =
im; shape[6].y =
im4;
4285 shape[7].x =
im4; shape[7].y =
im4;
4286 shape[8].x = 0; shape[8].y =
im;
4287 shape[9].x =-
im4; shape[9].y =
im4;
4288 shape[10].x= -
im; shape[10].y=
im4;
4289 ctxt->markerType = 3;
4297 shape[0].x = -
im; shape[0].y =
im4;
4298 shape[1].x =-
im2; shape[1].y =-
im1;
4299 shape[2].x =-
im3; shape[2].y = -
im;
4300 shape[3].x = 0; shape[3].y =-
im2;
4301 shape[4].x =
im3; shape[4].y = -
im;
4302 shape[5].x =
im2; shape[5].y =-
im1;
4303 shape[6].x =
im; shape[6].y =
im4;
4304 shape[7].x =
im4; shape[7].y =
im4;
4305 shape[8].x = 0; shape[8].y =
im;
4306 shape[9].x =-
im4; shape[9].y =
im4;
4307 shape[10].x= -
im; shape[10].y=
im4;
4308 ctxt->markerType = 2;
4312 shape[0].x = 0; shape[0].y =
im;
4313 shape[1].x =
im; shape[1].y = -
im;
4314 shape[2].x = -
im; shape[2].y = -
im;
4315 shape[3].x = 0; shape[3].y =
im;
4316 ctxt->markerType = 2;
4321 shape[0].x =-
imx; shape[0].y = 0;
4322 shape[1].x = 0; shape[1].y = -
im;
4323 shape[2].x =
imx; shape[2].y = 0;
4324 shape[3].x = 0; shape[3].y =
im;
4325 shape[4].x =-
imx; shape[4].y = 0;
4326 ctxt->markerType = 3;
4331 shape[0].x = -
im; shape[0].y =-
imx;
4332 shape[1].x =-
imx; shape[1].y =-
imx;
4333 shape[2].x =-
imx; shape[2].y = -
im;
4334 shape[3].x =
imx; shape[3].y = -
im;
4335 shape[4].x =
imx; shape[4].y =-
imx;
4336 shape[5].x =
im; shape[5].y =-
imx;
4337 shape[6].x =
im; shape[6].y =
imx;
4338 shape[7].x =
imx; shape[7].y =
imx;
4339 shape[8].x =
imx; shape[8].y =
im;
4340 shape[9].x =-
imx; shape[9].y =
im;
4341 shape[10].x=-
imx; shape[10].y=
imx;
4342 shape[11].x= -
im; shape[11].y=
imx;
4343 shape[12].x= -
im; shape[12].y=-
imx;
4344 ctxt->markerType = 3;
4348 shape[0].x =-
im; shape[0].y = 0;
4349 shape[1].x = 0; shape[1].y = -
im;
4350 shape[2].x =
im; shape[2].y = 0;
4351 shape[3].x = 0; shape[3].y =
im;
4352 shape[4].x =-
im; shape[4].y = 0;
4353 shape[5].x =
im; shape[5].y = 0;
4354 shape[6].x = 0; shape[6].y =
im;
4355 shape[7].x = 0; shape[7].y =-
im;
4356 ctxt->markerType = 2;
4360 shape[0].x = -
im; shape[0].y = -
im;
4361 shape[1].x =
im; shape[1].y = -
im;
4362 shape[2].x =
im; shape[2].y =
im;
4363 shape[3].x = -
im; shape[3].y =
im;
4364 shape[4].x = -
im; shape[4].y = -
im;
4365 shape[5].x =
im; shape[5].y =
im;
4366 shape[6].x = -
im; shape[6].y =
im;
4367 shape[7].x =
im; shape[7].y = -
im;
4368 ctxt->markerType = 2;
4373 shape[0].x = 0; shape[0].y = 0;
4374 shape[1].x =-
im2; shape[1].y =
im;
4375 shape[2].x =
im2; shape[2].y =
im;
4376 shape[3].x = 0; shape[3].y = 0;
4377 shape[4].x =-
im2; shape[4].y = -
im;
4378 shape[5].x = -
im; shape[5].y = 0;
4379 shape[6].x = 0; shape[6].y = 0;
4380 shape[7].x =
im; shape[7].y = 0;
4381 shape[8].x =
im2; shape[8].y = -
im;
4382 shape[9].x = 0; shape[9].y = 0;
4383 ctxt->markerType = 2;
4388 shape[0].x = -
im; shape[0].y = 0;
4389 shape[1].x = -
im; shape[1].y =-
im2;
4390 shape[2].x =-
im2; shape[2].y = -
im;
4391 shape[3].x =
im2; shape[3].y = -
im;
4392 shape[4].x =
im; shape[4].y =-
im2;
4393 shape[5].x =
im; shape[5].y =
im2;
4394 shape[6].x =
im2; shape[6].y =
im;
4395 shape[7].x =-
im2; shape[7].y =
im;
4396 shape[8].x = -
im; shape[8].y =
im2;
4397 shape[9].x = -
im; shape[9].y = 0;
4398 shape[10].x =
im; shape[10].y = 0;
4399 shape[11].x = 0; shape[11].y = 0;
4400 shape[12].x = 0; shape[12].y = -
im;
4401 shape[13].x = 0; shape[13].y =
im;
4402 shape[14].x = 0; shape[14].y = 0;
4403 ctxt->markerType = 2;
4408 shape[0].x = 0; shape[0].y = 0;
4409 shape[1].x =-
im2; shape[1].y =
im;
4410 shape[2].x =
im2; shape[2].y =
im;
4411 shape[3].x = 0; shape[3].y = 0;
4412 shape[4].x =-
im2; shape[4].y = -
im;
4413 shape[5].x = -
im; shape[5].y = 0;
4414 shape[6].x = 0; shape[6].y = 0;
4415 shape[7].x =
im; shape[7].y = 0;
4416 shape[8].x =
im2; shape[8].y = -
im;
4417 ctxt->markerType = 3;
4422 shape[0].x = 0; shape[0].y = 0;
4423 shape[1].x =
im2; shape[1].y =
im;
4424 shape[2].x =
im; shape[2].y =
im2;
4425 shape[3].x = 0; shape[3].y = 0;
4426 shape[4].x =
im; shape[4].y = -
im2;
4427 shape[5].x =
im2; shape[5].y = -
im;
4428 shape[6].x = 0; shape[6].y = 0;
4429 shape[7].x = -
im2; shape[7].y = -
im;
4430 shape[8].x = -
im; shape[8].y = -
im2;
4431 shape[9].x = 0; shape[9].y = 0;
4432 shape[10].x = -
im; shape[10].y =
im2;
4433 shape[11].x = -
im2; shape[11].y =
im;
4434 shape[12].x = 0; shape[12].y = 0;
4435 ctxt->markerType = 2;
4440 shape[0].x = 0; shape[0].y = 0;
4441 shape[1].x =
im2; shape[1].y =
im;
4442 shape[2].x =
im; shape[2].y =
im2;
4443 shape[3].x = 0; shape[3].y = 0;
4444 shape[4].x =
im; shape[4].y = -
im2;
4445 shape[5].x =
im2; shape[5].y = -
im;
4446 shape[6].x = 0; shape[6].y = 0;
4447 shape[7].x = -
im2; shape[7].y = -
im;
4448 shape[8].x = -
im; shape[8].y = -
im2;
4449 shape[9].x = 0; shape[9].y = 0;
4450 shape[10].x = -
im; shape[10].y =
im2;
4451 shape[11].x = -
im2; shape[11].y =
im;
4452 shape[12].x = 0; shape[12].y = 0;
4453 ctxt->markerType = 3;
4458 shape[0].x= 0; shape[0].y=
im;
4459 shape[1].x= -
imx; shape[1].y=
imx;
4460 shape[2].x = -
im; shape[2].y = 0;
4461 shape[3].x = -
imx; shape[3].y = -
imx;
4462 shape[4].x = 0; shape[4].y = -
im;
4463 shape[5].x =
imx; shape[5].y = -
imx;
4464 shape[6].x =
im; shape[6].y = 0;
4465 shape[7].x=
imx; shape[7].y=
imx;
4466 shape[8].x= 0; shape[8].y=
im;
4467 ctxt->markerType = 2;
4472 shape[0].x = 0; shape[0].y =
im;
4473 shape[1].x = -
imx; shape[1].y =
imx;
4474 shape[2].x = -
im; shape[2].y = 0;
4475 shape[3].x = -
imx; shape[3].y = -
imx;
4476 shape[4].x = 0; shape[4].y = -
im;
4477 shape[5].x =
imx; shape[5].y = -
imx;
4478 shape[6].x =
im; shape[6].y = 0;
4479 shape[7].x =
imx; shape[7].y =
imx;
4480 shape[8].x = 0; shape[8].y =
im;
4481 ctxt->markerType = 3;
4486 shape[0].x = 0; shape[0].y = 0;
4487 shape[1].x =
im2; shape[1].y =
im;
4488 shape[2].x = -
im2; shape[2].y =
im;
4489 shape[3].x =
im2; shape[3].y = -
im;
4490 shape[4].x = -
im2; shape[4].y = -
im;
4491 shape[5].x = 0; shape[5].y = 0;
4492 shape[6].x =
im; shape[6].y =
im2;
4493 shape[7].x =
im; shape[7].y = -
im2;
4494 shape[8].x = -
im; shape[8].y =
im2;
4495 shape[9].x = -
im; shape[9].y = -
im2;
4496 shape[10].x = 0; shape[10].y = 0;
4497 ctxt->markerType = 2;
4503 shape[0].x =
im0; shape[0].y =
im0;
4504 shape[1].x =
im2; shape[1].y =
im;
4505 shape[2].x = -
im2; shape[2].y =
im;
4506 shape[3].x = -
im0; shape[3].y =
im0;
4507 shape[4].x = -
im; shape[4].y =
im2;
4508 shape[5].x = -
im; shape[5].y = -
im2;
4509 shape[6].x = -
im0; shape[6].y = -
im0;
4510 shape[7].x = -
im2; shape[7].y = -
im;
4511 shape[8].x =
im2; shape[8].y = -
im;
4512 shape[9].x =
im0; shape[9].y = -
im0;
4513 shape[10].x =
im; shape[10].y = -
im2;
4514 shape[11].x =
im; shape[11].y =
im2;
4515 shape[12].x =
im0; shape[12].y =
im0;
4516 ctxt->markerType = 3;
4521 shape[0].x = 0; shape[0].y =
im2;
4522 shape[1].x = -
im2; shape[1].y =
im;
4523 shape[2].x = -
im; shape[2].y =
im2;
4524 shape[3].x = -
im2; shape[3].y = 0;
4525 shape[4].x = -
im; shape[4].y = -
im2;
4526 shape[5].x = -
im2; shape[5].y = -
im;
4527 shape[6].x = 0; shape[6].y = -
im2;
4528 shape[7].x =
im2; shape[7].y = -
im;
4529 shape[8].x =
im; shape[8].y = -
im2;
4530 shape[9].x =
im2; shape[9].y = 0;
4531 shape[10].x =
im; shape[10].y =
im2;
4532 shape[11].x =
im2; shape[11].y =
im;
4533 shape[12].x = 0; shape[12].y =
im2;
4534 ctxt->markerType = 2;
4539 shape[0].x = 0; shape[0].y =
im2;
4540 shape[1].x = -
im2; shape[1].y =
im;
4541 shape[2].x = -
im; shape[2].y =
im2;
4542 shape[3].x = -
im2; shape[3].y = 0;
4543 shape[4].x = -
im; shape[4].y = -
im2;
4544 shape[5].x = -
im2; shape[5].y = -
im;
4545 shape[6].x = 0; shape[6].y = -
im2;
4546 shape[7].x =
im2; shape[7].y = -
im;
4547 shape[8].x =
im; shape[8].y = -
im2;
4548 shape[9].x =
im2; shape[9].y = 0;
4549 shape[10].x =
im; shape[10].y =
im2;
4550 shape[11].x =
im2; shape[11].y =
im;
4551 shape[12].x = 0; shape[12].y =
im2;
4552 ctxt->markerType = 3;
4557 shape[0].x = 0; shape[0].y =
im2*1.005;
4558 shape[1].x = -
im2; shape[1].y =
im;
4559 shape[2].x = -
im; shape[2].y =
im2;
4560 shape[3].x = -
im2; shape[3].y = 0;
4561 shape[4].x = -
im; shape[4].y = -
im2;
4562 shape[5].x = -
im2; shape[5].y = -
im;
4563 shape[6].x = 0; shape[6].y = -
im2;
4564 shape[7].x =
im2; shape[7].y = -
im;
4565 shape[8].x =
im; shape[8].y = -
im2;
4566 shape[9].x =
im2; shape[9].y = 0;
4567 shape[10].x =
im; shape[10].y =
im2;
4568 shape[11].x =
im2; shape[11].y =
im;
4569 shape[12].x = 0; shape[12].y =
im2*0.995;
4570 shape[13].x =
im2*0.995; shape[13].y = 0;
4571 shape[14].x = 0; shape[14].y = -
im2*0.995;
4572 shape[15].x = -
im2*0.995; shape[15].y = 0;
4573 shape[16].x = 0; shape[16].y =
im2*0.995;
4574 ctxt->markerType = 3;
4579 shape[0].x =-
imx; shape[0].y =-
imx*1.005;
4580 shape[1].x =-
imx; shape[1].y = -
im;
4581 shape[2].x =
imx; shape[2].y = -
im;
4582 shape[3].x =
imx; shape[3].y =-
imx;
4583 shape[4].x =
im; shape[4].y =-
imx;
4584 shape[5].x =
im; shape[5].y =
imx;
4585 shape[6].x =
imx; shape[6].y =
imx;
4586 shape[7].x =
imx; shape[7].y =
im;
4587 shape[8].x =-
imx; shape[8].y =
im;
4588 shape[9].x =-
imx; shape[9].y =
imx;
4589 shape[10].x = -
im; shape[10].y =
imx;
4590 shape[11].x = -
im; shape[11].y =-
imx;
4591 shape[12].x =-
imx; shape[12].y =-
imx*0.995;
4592 shape[13].x =-
imx; shape[13].y =
imx;
4593 shape[14].x =
imx; shape[14].y =
imx;
4594 shape[15].x =
imx; shape[15].y =-
imx;
4595 shape[16].x =-
imx; shape[16].y =-
imx*1.005;
4596 ctxt->markerType = 3;
4600 ctxt->markerType = 0;
4601 ctxt->markerSize = 0;
4619 ctxt->textAlign = 7;
4622 ctxt->textAlign = 4;
4625 ctxt->textAlign = 1;
4632 ctxt->textAlign = 8;
4635 ctxt->textAlign = 5;
4638 ctxt->textAlign = 2;
4645 ctxt->textAlign = 9;
4648 ctxt->textAlign = 6;
4651 ctxt->textAlign = 3;
4664 Error(
"SetAttText",
"cannot get GC values");
4694 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)
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 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 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
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 Cursor gNullCursor
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.
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
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
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.
Int_t GetTextAlignW(WinContext_t wctxt) const
Return text align value for specified window context.
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.
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
Get window drawing context Should remain valid until window exists.
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 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 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 FIXME: Only as temporary solution while some code analyze current line styl...
~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.
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.
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.
Style_t GetFillStyle() const override
Return current fill style FIXME: Only as temporary solution while some code analyze current fill styl...
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.
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 fTextAlign
Text alignment (set in SetTextAlign) !!! conflict with TAttText.
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.
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.
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 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.
void ClearWindowW(WinContext_t wctxt) override
Clear specified window.
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.
Width_t GetLineWidth() const override
Return current line width FIXME: Only as temporary solution while some code analyze current line wide...
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.
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()).
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.
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
TAttText fAttText
current text attribute
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
Int_t textAlign
selected text align
Int_t lineWidth
X11 line width.
Int_t dashOffset
current dash offset
Int_t fillFasi
selected fasi 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
X11 fill method.
std::vector< XPoint > markerShape
marker shape points
UInt_t fWidth
width of the window
UInt_t fHclip
height of the clipping rectangle
Int_t dashLength
total length of dashes
Bool_t fShared
notify when window is shared
TVirtualX::EDrawMode fDrawMode
current draw mode
Drawable fBuffer
pixmap used for double buffer
Int_t markerSize
size of simple markers
Pixmap fillPattern
current initialized fill pattern
TAttLine fAttLine
current line attributes
Int_t markerType
4 differen kinds of marker
TAttMarker fAttMarker
current marker attribute
GC fGClist[kMAXGC]
list of GC object, individual for each window
Int_t fXclip
x coordinate of the clipping rectangle
TAttFill fAttFill
current fill attributes
UInt_t fWclip
width of the clipping rectangle
Int_t lineStyle
X11 line style.
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)