53#pragma optimize("",off)
141 Warning(
"CellArrayBegin",
"not yet implemented");
149 Warning(
"CellArrayFill",
"not yet implemented");
157 Warning(
"CellArrayEnd",
"not yet implemented");
193 PrintStr(
" 0 R /XYZ null null 0]@");
230 PrintStr(
" 0 R /XYZ null null 0]@");
282 for (std::size_t i = 0; i <
fAlphas.size(); i++) {
284 TString::Format(
"/ca%3.2f << /Type /ExtGState /ca %3.2f >> /CA%3.2f << /Type /ExtGState /CA %3.2f >>@",
300 for (std::size_t i = 0; i <
fObjPos.size(); ++i) {
343 if (fillis == 3 || fillis == 2) {
345 x[0] = x1;
y[0] = y1;
346 x[1] = x2;
y[1] = y1;
347 x[2] = x2;
y[2] = y2;
348 x[3] = x1;
y[3] = y2;
351 if (fillsi > 0 && fillsi < 26) {
352 x[0] = x1;
y[0] = y1;
353 x[1] = x2;
y[1] = y1;
354 x[2] = x2;
y[2] = y2;
355 x[3] = x1;
y[3] = y2;
409 xps[1] = xps[0] + border; yps[1] = yps[0] + border;
410 xps[2] = xps[1]; yps[2] =
YtoPDF(yt) - border;
411 xps[3] =
XtoPDF(xt) - border; yps[3] = yps[2];
413 xps[5] = xps[0]; yps[5] = yps[4];
414 xps[6] = xps[0]; yps[6] = yps[0];
417 for (i=1;i<7;i++)
LineTo(xps[i], yps[i]);
424 xps[1] = xps[0] + border; yps[1] = yps[0] + border;
425 xps[2] =
XtoPDF(xt) - border; yps[2] = yps[1];
426 xps[3] = xps[2]; yps[3] =
YtoPDF(yt) - border;
428 xps[5] = xps[4]; yps[5] = yps[0];
429 xps[6] = xps[0]; yps[6] = yps[0];
432 for (i=1;i<7;i++)
LineTo(xps[i], yps[i]);
441 Warning(
"DrawHatch",
"hatch fill style not yet implemented");
449 Warning(
"DrawHatch",
"hatch fill style not yet implemented");
496 if (xy[0].GetX() == xy[
n-1].GetX() && xy[0].GetY() == xy[
n-1].GetY())
PrintFast(3,
" cl");
550 if (xy[0].GetX() == xy[
n-1].GetX() && xy[0].GetY() == xy[
n-1].GetY())
PrintFast(3,
" cl");
575 else if (ms >= 6 && ms <= 8)
577 else if (ms >= 9 && ms <= 19)
589 const Int_t kBASEMARKER = 8;
590 Float_t sbase = msize*kBASEMARKER;
614 }
else if (ms == 2) {
620 }
else if (ms == 5) {
621 MoveTo(ix-m2*0.707, iy-m2*0.707);
622 LineTo(ix+m2*0.707, iy+m2*0.707);
623 MoveTo(ix-m2*0.707, iy+m2*0.707);
624 LineTo(ix+m2*0.707, iy-m2*0.707);
626 }
else if (ms == 3 || ms == 31) {
631 MoveTo(ix-m2*0.707, iy-m2*0.707);
632 LineTo(ix+m2*0.707, iy+m2*0.707);
633 MoveTo(ix-m2*0.707, iy+m2*0.707);
634 LineTo(ix+m2*0.707, iy-m2*0.707);
636 }
else if (ms == 24 || ms == 20) {
645 }
else if (ms == 25 || ms == 21) {
649 }
else if (ms == 23 || ms == 32) {
655 }
else if (ms == 26 || ms == 22) {
660 }
else if (ms == 27 || ms == 33) {
666 }
else if (ms == 28 || ms == 34) {
680 }
else if (ms == 29 || ms == 30) {
682 LineTo(ix+0.112255*
m, iy+0.15451*
m);
683 LineTo(ix+0.47552*
m , iy+0.15451*
m);
684 LineTo(ix+0.181635*
m, iy-0.05902*
m);
685 LineTo(ix+0.29389*
m , iy-0.40451*
m);
687 LineTo(ix-0.29389*
m , iy-0.40451*
m);
688 LineTo(ix-0.181635*
m, iy-0.05902*
m);
689 LineTo(ix-0.47552*
m , iy+0.15451*
m);
690 LineTo(ix-0.112255*
m, iy+0.15451*
m);
692 }
else if (ms == 35 ) {
703 }
else if (ms == 36 ) {
714 }
else if (ms == 37 || ms == 39 ) {
727 }
else if (ms == 38 ) {
745 }
else if (ms == 40 || ms == 41 ) {
761 }
else if (ms == 42 || ms == 43 ) {
773 }
else if (ms == 44 ) {
787 }
else if (ms == 45 ) {
803 }
else if (ms == 46 || ms == 47 ) {
819 }
else if (ms == 48 ) {
839 }
else if (ms == 49 ) {
841 MoveTo(ix-m6, iy-m6*1.01);
853 LineTo(ix-m6, iy-m6*0.99);
863 if ((ms > 19 && ms < 24) || ms == 29 || ms == 33 || ms == 34 ||
864 ms == 39 || ms == 41 || ms == 43 || ms == 45 ||
865 ms == 47 || ms == 48 || ms == 49) {
891 else if (ms >= 6 && ms <= 8)
893 else if (ms >= 9 && ms <= 19)
905 const Int_t kBASEMARKER = 8;
906 Float_t sbase = msize*kBASEMARKER;
929 }
else if (ms == 2) {
935 }
else if (ms == 5) {
936 MoveTo(ix-m2*0.707, iy-m2*0.707);
937 LineTo(ix+m2*0.707, iy+m2*0.707);
938 MoveTo(ix-m2*0.707, iy+m2*0.707);
939 LineTo(ix+m2*0.707, iy-m2*0.707);
941 }
else if (ms == 3 || ms == 31) {
946 MoveTo(ix-m2*0.707, iy-m2*0.707);
947 LineTo(ix+m2*0.707, iy+m2*0.707);
948 MoveTo(ix-m2*0.707, iy+m2*0.707);
949 LineTo(ix+m2*0.707, iy-m2*0.707);
951 }
else if (ms == 24 || ms == 20) {
960 }
else if (ms == 25 || ms == 21) {
964 }
else if (ms == 23 || ms == 32) {
970 }
else if (ms == 26 || ms == 22) {
975 }
else if (ms == 27 || ms == 33) {
981 }
else if (ms == 28 || ms == 34) {
995 }
else if (ms == 29 || ms == 30) {
997 LineTo(ix-0.112255*
m, iy-0.15451*
m);
998 LineTo(ix-0.47552*
m , iy-0.15451*
m);
999 LineTo(ix-0.181635*
m, iy+0.05902*
m);
1000 LineTo(ix-0.29389*
m , iy+0.40451*
m);
1002 LineTo(ix+0.29389*
m , iy+0.40451*
m);
1003 LineTo(ix+0.181635*
m, iy+0.05902*
m);
1004 LineTo(ix+0.47552*
m , iy-0.15451*
m);
1005 LineTo(ix+0.112255*
m, iy-0.15451*
m);
1007 }
else if (ms == 35 ) {
1017 }
else if (ms == 36 ) {
1027 }
else if (ms == 37 || ms == 39 ) {
1039 }
else if (ms == 38 ) {
1056 }
else if (ms == 40 || ms == 41 ) {
1071 }
else if (ms == 42 || ms == 43 ) {
1082 }
else if (ms == 44 ) {
1095 }
else if (ms == 45 ) {
1096 MoveTo(ix+m6/2., iy+m6/2.);
1099 LineTo(ix-m6/2., iy+m6/2.);
1102 LineTo(ix-m6/2., iy-m6/2.);
1105 LineTo(ix+m6/2., iy-m6/2.);
1108 LineTo(ix+m6/2., iy+m6/2.);
1110 }
else if (ms == 46 || ms == 47 ) {
1125 }
else if (ms == 48 ) {
1126 MoveTo(ix , iy+m8*1.005);
1138 LineTo(ix , iy+m8*0.995);
1139 LineTo(ix+m8*0.995, iy );
1140 LineTo(ix , iy-m8*0.995);
1141 LineTo(ix-m8*0.995, iy );
1142 LineTo(ix , iy+m8*0.995);
1144 }
else if (ms == 49 ) {
1145 MoveTo(ix-m6, iy-m6*1.01);
1157 LineTo(ix-m6, iy-m6*0.99);
1161 MoveTo(ix-m6, iy-m6*1.01);
1167 if ((ms > 19 && ms < 24) || ms == 29 || ms == 33 || ms == 34 ||
1168 ms == 39 || ms == 41 || ms == 43 || ms == 45 ||
1169 ms == 47 || ms == 48 || ms == 49) {
1193 static Float_t dyhatch[24] = {.0075,.0075,.0075,.0075,.0075,.0075,.0075,.0075,
1194 .01 ,.01 ,.01 ,.01 ,.01 ,.01 ,.01 ,.01 ,
1195 .015 ,.015 ,.015 ,.015 ,.015 ,.015 ,.015 ,.015};
1196 static Float_t anglehatch[24] = {180, 90,135, 45,150, 30,120, 60,
1197 180, 90,135, 45,150, 30,120, 60,
1198 180, 90,135, 45,150, 30,120, 60};
1199 Int_t n = 0, fais = 0 , fasi = 0;
1218 if (fais == 3 || fais == 2) {
1219 if (fasi > 100 && fasi <125) {
1220 DrawHatch(dyhatch[fasi-101],anglehatch[fasi-101],
n, xw, yw);
1225 if (fasi > 0 && fasi < 26) {
1244 if (xw[0] == xw[
n-1] && yw[0] == yw[
n-1])
PrintFast(2,
" h");
1247 if (fais == 0) {
PrintFast(2,
" s");
return;}
1248 if (fais == 3 || fais == 2) {
1249 if (fasi > 0 && fasi < 26) {
1280 static Float_t dyhatch[24] = {.0075,.0075,.0075,.0075,.0075,.0075,.0075,.0075,
1281 .01 ,.01 ,.01 ,.01 ,.01 ,.01 ,.01 ,.01 ,
1282 .015 ,.015 ,.015 ,.015 ,.015 ,.015 ,.015 ,.015};
1283 static Float_t anglehatch[24] = {180, 90,135, 45,150, 30,120, 60,
1284 180, 90,135, 45,150, 30,120, 60,
1285 180, 90,135, 45,150, 30,120, 60};
1286 Int_t n = 0, fais = 0, fasi = 0;
1305 if (fais == 3 || fais == 2) {
1306 if (fasi > 100 && fasi <125) {
1307 DrawHatch(dyhatch[fasi-101],anglehatch[fasi-101],
n, xw, yw);
1312 if (fasi > 0 && fasi < 26) {
1331 if (xw[0] == xw[
n-1] && yw[0] == yw[
n-1])
PrintFast(2,
" h");
1334 if (fais == 0) {
PrintFast(2,
" s");
return;}
1335 if (fais == 3 || fais == 2) {
1336 if (fasi > 0 && fasi < 26) {
1360 Warning(
"EndObject",
"No Object currently opened.");
1371 static const char *sdtfonts[] = {
1372 "/Times-Italic" ,
"/Times-Bold" ,
"/Times-BoldItalic",
1373 "/Helvetica" ,
"/Helvetica-Oblique" ,
"/Helvetica-Bold" ,
1374 "/Helvetica-BoldOblique",
"/Courier" ,
"/Courier-Oblique" ,
1375 "/Courier-Bold" ,
"/Courier-BoldOblique",
"/Symbol" ,
1376 "/Times-Roman" ,
"/ZapfDingbats" ,
"/Symbol"};
1389 if (i!=11 && i!=13 && i!=14) {
1390 PrintStr(
"/Encoding /WinAnsiEncoding");
1424 Warning(
"NewObject",
"An Object is already open.");
1431 Error(
"NewObject",
"Wrong id %d is specified.",
n);
1484 PrintStr(
" 0 R /XYZ null null 0]@");
1518 Double_t xlow=0, ylow=0, xup=1, yup=1;
1520 xlow =
gPad->GetAbsXlowNDC();
1521 xup = xlow +
gPad->GetAbsWNDC();
1522 ylow =
gPad->GetAbsYlowNDC();
1523 yup = ylow +
gPad->GetAbsHNDC();
1598 PrintStr(
"/Filter [/FlateDecode]@");
1618 WriteCM(1, 0, 0, 1, xmargin, ymargin);
1648 Error(
"On",
"no PDF file open");
1661 Warning(
"Open",
"PDF file already open");
1680 ww *=
gPad->GetWNDC();
1681 wh *=
gPad->GetHNDC();
1686 if (yrange >
fYsize) { yrange =
fYsize; xrange = yrange/ratio;}
1692 Error(
"Open",
"Cannot open file: %s", fname);
1739 PrintStr(
"/PageMode /UseOutlines@");
1745 PrintStr(
"/Creator (ROOT Version ");
1754 snprintf(str,24,
"D:%4.4d%2.2d%2.2d%2.2d%2.2d%2.2d%c%2.2d'%2.2d'",
1758 toff < 0 ?
'-' :
'+',
1778 PrintStr(
"/ProcSet [/PDF /Text]@");
1833 Int_t len = strlen(str);
1834 if (len == 0)
return;
1896 if (color < 0) color = 0;
1926 if (
gStyle->GetColorModelPS()) {
1927 Double_t colCyan, colMagenta, colYellow;
1934 colCyan = (1-
fRed-colBlack)/(1-colBlack);
1935 colMagenta = (1-
fGreen-colBlack)/(1-colBlack);
1936 colYellow = (1-
fBlue-colBlack)/(1-colBlack);
1938 if (colCyan <= 0.000001) colCyan = 0;
1939 if (colMagenta <= 0.000001) colMagenta = 0;
1940 if (colYellow <= 0.000001) colYellow = 0;
1941 if (colBlack <= 0.000001) colBlack = 0;
1984 if (
gStyle->GetColorModelPS()) {
1992 Double_t colCyan = (1-colRed-colBlack)/(1-colBlack);
1993 Double_t colMagenta = (1-colGreen-colBlack)/(1-colBlack);
1994 Double_t colYellow = (1-colBlue-colBlack)/(1-colBlack);
2008 case 4: ipat = 5;
break;
2009 case 5: ipat = 4;
break;
2010 case 6: ipat = 7;
break;
2011 case 7: ipat = 6;
break;
2012 case 17: ipat = 18;
break;
2013 case 18: ipat = 17;
break;
2014 case 20: ipat = 16;
break;
2015 case 16: ipat = 20;
break;
2016 case 21: ipat = 22;
break;
2017 case 22: ipat = 21;
break;
2020 snprintf(cpat,10,
" /P%2.2d scn", ipat);
2097 sscanf(((
TObjString*)tokens->
At(j))->GetName(),
"%d", &it);
2159 ftsize = (sizeTTF*
fXsize*
gPad->GetAbsWNDC())/wh;
2163 ftsize = (sizeTTF*
fYsize*
gPad->GetAbsHNDC())/hh;
2165 Double_t fontsize = 72*(ftsize)/2.54;
2166 if (fontsize <= 0)
return;
2190 if (txalh < 1) txalh = 1;
else if (txalh > 3) txalh = 3;
2192 if (txalv < 1) txalv = 1;
else if (txalv > 3) txalv = 3;
2196 }
else if (txalv == 2) {
2266 const Int_t len=strlen(chars);
2277 saveAttText.TAttText::operator=(*this);
2284 t.TAttText::Modify();
2288 Int_t *charDeltas =
nullptr;
2290 charDeltas =
new Int_t[len];
2291 for (
Int_t i = 0;i < len;i++) {
2294 charDeltas[i] = wa1 - ww;
2296 for (
Int_t i = len - 1;i > 0;i--) {
2297 charDeltas[i] -= charDeltas[i-1];
2301 for (
Int_t i = 1;i < len;i++) {
2302 tmp[0] = chars[i-1];
2305 Double_t wwl =
gPad->AbsPixeltoX(width - charDeltas[i]) -
gPad->AbsPixeltoX(0);
2306 wwl -= 0.5*(
gPad->AbsPixeltoX(1) -
gPad->AbsPixeltoX(0));
2311 saveAttText.TAttText::Modify();
2317 for (
Int_t i=0; i<len;i++) {
2318 if (chars[i]!=
'\n') {
2320 if (chars[i]==
'(' || chars[i]==
')') {
2338 if (
kerning)
delete [] charDeltas;
2360 fUrls.push_back(url);
2429 stream.next_in = (Bytef*)
fBuffer;
2431 stream.next_out = (Bytef*)out;
2433 stream.zalloc = (alloc_func)
nullptr;
2434 stream.zfree = (free_func)
nullptr;
2435 stream.opaque = (voidpf)
nullptr;
2437 err = deflateInit(&stream, Z_DEFAULT_COMPRESSION);
2439 Error(
"WriteCompressedBuffer",
"error in deflateInit (zlib)");
2444 err = deflate(&stream, Z_FINISH);
2445 if (
err != Z_STREAM_END) {
2446 deflateEnd(&stream);
2447 Error(
"WriteCompressedBuffer",
"error in deflate (zlib)");
2452 err = deflateEnd(&stream);
2454 Error(
"WriteCompressedBuffer",
"error in deflateEnd (zlib)");
2457 fStream->write(out, stream.total_out);
2459 fNByte += stream.total_out;
2478 if (strstr(str,
"e") || strstr(str,
"E"))
snprintf(str,15,
" %10.8f", z);
2481 if (strstr(str,
"e") || strstr(str,
"E"))
snprintf(str,15,
"%10.8f", z);
2494 if (
gStyle->GetColorModelPS()) {
2495 PrintStr(
"[/Pattern /DeviceCMYK]@");
2497 PrintStr(
"[/Pattern /DeviceRGB]@");
2588 PrintStr(
"<</Type/Pattern/Matrix[1 0 0 1 20 28]/PatternType 1/Resources");
2590 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 98 4]/XStep 98/YStep 4/Length 91/Filter/FlateDecode>>");
2593 fStream->write(
"\r\nH\211*\3442T\310T\3402P0P04\200\340\242T\256p\205<\240\220\027P0K\301P\241\034(\254\340\253\020m\250\020k\240\220\302e\244`\242\220\313ei\t\244r\200\272\215A\034\v \225\003\2241\202\310\030\201e\f!2\206@N0W \027@\200\001\0|c\024\357\n", 93);
2600 PrintStr(
"<</Type/Pattern/Matrix[0.75 0 0 0.75 20 28]/PatternType 1/Resources");
2602 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 96 4]/XStep 96/YStep 4/Length 92/Filter/FlateDecode>>@");
2605 fStream->write(
"\r\nH\211$\2121\n\2000\024C\367\234\"G\370\277\025\321+\b\016\342\340P\334tP\252\240\213\3277\332!\204\274\227\v\316\2150\032\335J\356\025\023O\241Np\247\363\021f\317\344\214\234\215\v\002+\036h\033U\326/~\243Ve\231PL\370\215\027\343\032#\006\274\002\f\0\242`\025:\n", 94);
2612 PrintStr(
"<</Type/Pattern/Matrix[0.5 0 0 0.5 20 28]/PatternType 1/Resources");
2614 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 96 16]/XStep 96/YStep 16/Length 93/Filter/FlateDecode>>@");
2617 fStream->write(
"\r\nH\211$\2121\n\2000\024C\367\234\"G\370\261(\366\n\202\20388\210\233\016J\025t\361\372\376\332!\204\274\227\033\342N\030\215\262\222g\303\304\313Q\347\360\240\370:f\317Y\f\\\214+**\360Dls'\177\306\274\032\257\344\256.\252\376\215\212\221\217\021\003>\001\006\0\317\243\025\254\n", 95);
2624 PrintStr(
"<</Type/Pattern/Matrix[0.06 0 0 0.06 20 28]/PatternType 1/Resources");
2626 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 63/Filter/FlateDecode>>");
2629 fStream->write(
"\r\nH\211*\3442T\310T\3402P0P04\200\340\242T\256p\205<\240\220\027P0K\301D\241\034(\254\340\253\020\035k\240\220\002V\231\313\005S\233\303\025\314\025\310\005\020`\0\344\270\r\274\n", 65);
2636 PrintStr(
"<</Type/Pattern/Matrix[0.06 0 0 0.06 20 28]/PatternType 1/Resources");
2638 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 66/Filter/FlateDecode>>");
2641 fStream->write(
"\r\nH\211*\3442T\310T\3402P0P04\200\340\242T\256p\205<\240\220\027P0K\301D\241\034(\254\340\253\020\035k\240\220\302\005Q\223\313\005\"\r\024r\270\202\271\002\271\0\002\f\0\344\320\r\274\n", 68);
2648 PrintStr(
"<</Type/Pattern/Matrix[0.03 0 0 0.03 20 28]/PatternType 1/Resources");
2650 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 66/Filter/FlateDecode>>");
2653 fStream->write(
"\r\nH\211*\3442T\310T\3402P0P04\200\340\242T\256p\205<\240\220\027P0K\301D\241\034(\254\340\253\020\035k\240\220\302e\nR\232\v\242@js\270\202\271\002\271\0\002\f\0\345X\r\305\n", 68);
2660 PrintStr(
"<</Type/Pattern/Matrix[0.03 0 0 0.03 20 28]/PatternType 1/Resources");
2662 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 68/Filter/FlateDecode>>");
2665 fStream->write(
"\r\nH\211*\3442T\310T\3402P0P04\200\340\242T\256p\205<\240\220\027P0K\301D\241\034(\254\340\253\020\035k\240\220\002\02465P\310\345\002)\0042r\270\202\271\002\271\0\002\f\0\345=\r\305\n", 70);
2672 PrintStr(
"<</Type/Pattern/Matrix[0.06 0 0 0.06 20 28]/PatternType 1/Resources");
2674 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 101 101]/XStep 100/YStep 100/Length 139/Filter/FlateDecode>>");
2677 fStream->write(
"\r\nH\211D\217\261\016\3020\fDw\177\305\315L6Q\225|\003\022C\305\300Puk+\201\032$\272\360\373\330\265\323\016\271\330\367\234\344\"x\201\030\214\252\232\030+%\353VZ.jd\367\205\003x\241({]\311\324]\323|\342\006\033J\201:\306\325\230Jg\226J\261\275D\257#\337=\220\260\354k\233\351\211\217Z75\337\020\374\324\306\035\303\310\230\342x=\303\371\275\307o\332s\331\223\224\240G\330\a\365\364\027`\0\nX1}\n",141);
2684 PrintStr(
"<</Type/Pattern/Matrix[0.06 0 0 0.06 20 28]/PatternType 1/Resources");
2686 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 108/Filter/FlateDecode>>");
2689 fStream->write(
"\r\nH\211*\3442T\310T\3402P0P04\200\340\242T\256p\205<\240\220\027P0K\301D\241\034(\254\340\253\020\035k\240\220\002\02465P\310\005RFFz&\020\002,d\240\220\314en\256g\0065\b,\001b\230\202$\240\232\214@\362\246`\2169H\336\024\2426\231\v&\200,\n\326\030\314\025\310\005\020`\0\f@\036\227\n", 110);
2696 PrintStr(
"<</Type/Pattern/Matrix[0.06 0 0 0.06 20 28]/PatternType 1/Resources");
2698 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 93/Filter/FlateDecode>>");
2701 fStream->write(
"\r\nH\211*\3442T\310T\3402P0P04\200\340\242T\256p\205<\240\220\027P0K\301D\241\034(\254\340\253\020\035k\240\220\002\02465P\310\345\002)\0042r\200\332\r\241\\C \017dN.\027L\312\0\302\205\2535\205j6\205X\224\303\025\314\025\310\005\020`\0\2127\031\t\n", 95);
2708 PrintStr(
"<</Type/Pattern/Matrix[0.125 0 0 0.125 20 28]/PatternType 1/Resources");
2710 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 164/Filter/FlateDecode>>");
2713 fStream->write(
"\r\nH\211\\\2171\016\3020\fEw\237\342\037\301ip\223^\001\211\001u`@l0\200(\022,\\\037;v\204\332\241\211\336\373\337V\363\246\204;\210\301H\354\337\347F'\274T\355U>\220\360U\215\003\316\027\306\2655\027=\a\306\223\304I\002m\332\330\356&\030\325\333fZ\275F\337\205\235\265O\270\032\004\331\214\336\305\270\004\227`\357i\256\223\342;]\344\255(!\372\356\205j\030\377K\335\220\344\377\210\274\306\022\330\337T{\214,\212;\301\3508\006\346\206\021O=\216|\212|\246#\375\004\030\0\216FF\207\n", 166);
2720 PrintStr(
"<</Type/Pattern/Matrix[0.125 0 0 0.125 20 28]/PatternType 1/Resources");
2722 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 226/Filter/FlateDecode>>");
2725 fStream->write(
"\r\nH\211<P;n\3030\f\335y\n\236 \220DK\242\256P\240C\321\241C\221\311\311\220\242\016\220.\275~D\221/\203I\342}\370(?(\363\215)q\342\234\374\373\273\322\027\337'\3646\301\037\316\374?a~\347\357s\342\313\2045\361A9\237\322fc\231\200\236F\263\301\334;\211\017\207\rN\311\252S\\\227{\247\006w\207\244\303\255p+(\205\333\360e/v\356a\315\317\360\272\320b|w\276\203o\340k\b\004\027\v$b\226\235,\242\254t(\024\nu\305Vm\313\021\375\327\272\257\227fuf\226ju\356\222x\030\024\313\261S\215\377\341\274,\203\254\253Z\\\262A\262\205eD\350\210\320\201\225\212\320\036\241\355\025\372JE,\2266\344\366\310U\344\016HFx>\351\203\236\002\f\0d}e\216\n", 228);
2732 PrintStr(
"<</Type/Pattern/Matrix[0.06 0 0 0.06 20 28]/PatternType 1/Resources");
2734 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 69/Filter/FlateDecode>>");
2737 fStream->write(
"\r\nH\211*\3442T\310T\3402P0P04\200\340\242T\256p\205<\240\220\027P0K\301D\241\034(\254\340\253\020\035k\240\220\002V\231\313\005S\233\303\005\241!\" ~0W \027@\200\001\0\331\227\020\253\n", 71);
2744 PrintStr(
"<</Type/Pattern/Matrix[0.15 0 0 0.15 20 28]/PatternType 1/Resources");
2746 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 80/YStep 80/Length 114/Filter/FlateDecode>>");
2749 fStream->write(
"\r\nH\2114\214=\n\2000\f\205\367\234\342\035!-\241\364\f\202\20388\210\233\016J+\350\342\365M\3723\224\327\367}I\036r8A\f\206\343\372\336\203\026\334\212\006\205\027\004\237b\214X7\306\256\33032\331\240~\022y[\315\026\206\222\372\330}\264\036\253\217\335\353\240\030\b%\223\245o=X\227\346\245\355K\341\345@\3613M\364\v0\0\207o\"\261\n", 116);
2756 PrintStr(
"<</Type/Pattern/Matrix[0.102 0 0 0.102 20 28]/PatternType 1/Resources");
2758 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 60 60]/XStep 60/YStep 60/Length 218/Filter/FlateDecode>>");
2761 fStream->write(
"\r\nH\211<\2211\016\3020\fEw\237\302'@\211c\267w@b@\f\f\210\2510\200(\022,\\\037\347\307\256Z\325\221\375\337\377\225\363\241\312\017\246\302\205'\274\337;\235\371\355\215\275\267\236\\\371\307\265\360\201/\327\3027o\233\361J\262\233\247~\362g\336\211zur!A]{\035}\031S\343\006p\241\226dKI\v\326\202\265\3153\331)X)\335fE\205M\235\373\327\r*\374\026\252\022\216u\223\200\361I\211\177\031\022\001#``\342GI\211\004c\221gi\246\231\247\221\247\231\247\233$XM3\315<\215<\315<K\211e\036#\215a4\366\344\035lm\214Z\314b\211Xj\337K\\\201$\332\325\v\365\2659\204\362\242\274'\v\221\r\321\211\216\364\027`\0\212'_\215\n", 220);
2768 PrintStr(
"<</Type/Pattern/Matrix[0.1 0 0 0.05 20 28]/PatternType 1/Resources");
2770 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 123/Filter/FlateDecode>>");
2773 fStream->write(
"\r\nH\211*\3442T\310T\3402P0P04\200\340\242T\256p\205<\240\220\027P0K\301D\241\034(\254\340\253\020\035k\240\220\302ej\240\0D\271 \332\314X\317B\301\330\002H\230\233*\030\231\202\310d.CC=#\020\v*\rV\235\214\254\v\210r@\264\261\031P\241\031H5D\253\021H\267\005\3104 \v\344\016\260\002\020\003lB0W \027@\200\001\0hU \305\n", 125);
2780 PrintStr(
"<</Type/Pattern/Matrix[0.06 0 0 0.06 20 28]/PatternType 1/Resources");
2782 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 66/Filter/FlateDecode>>");
2785 fStream->write(
"\r\nH\211*\3442T\310T\3402P0P04\200\340\242T\256p\205<\240\220\027P0K\301D\241\034(\254\340\253\020md\242\020k\240\220\002V\234\313\005S\236\303\025\314\025\310\005\020`\0\r\351\016B\n", 68);
2792 PrintStr(
"<</Type/Pattern/Matrix[0.06 0 0 0.06 20 28]/PatternType 1/Resources");
2794 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 69/Filter/FlateDecode>>");
2797 fStream->write(
"\r\nH\211*\3442T\310T\3402P0P04\200\340\242T\256p\205<\240\220\027P0K\301D\241\034(\254\340\253\020md\242\020k\240\220\302\005Q\226\313\005\"\r\024r\270\202\271\002\271\0\002\f\0\016\001\016B\n", 71);
2804 PrintStr(
"<</Type/Pattern/Matrix[0.117 0 0 0.117 20 28]/PatternType 1/Resources");
2806 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 149/Filter/FlateDecode>>");
2809 fStream->write(
"\r\nH\211L\216;\016\302@\fD{\237bN\020\331+6a\257\200D\201((P\252@\001R\220\240\341\372\370\263\216(\326\266f\336\330\373&\301\003\304`\b\307\373\334\351\202\227J\a\025\237\020|U\306\021\327\231q\243\306\250\214\325\372T\006\336\367\032\262\326\205\3124\264b\243$\"n.\244=\314\250!\2139\033\327\022i=\323\317\2518\332T}\347.\202\346W\373\372j\315\221\344\266\213=\237\241\344\034\361\264!\236w\344\177\271o8\323\211~\002\f\0\366\3026\233\n", 151);
2816 PrintStr(
"<</Type/Pattern/Matrix[0.05 0 0 0.1 20 28]/PatternType 1/Resources");
2818 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 122/Filter/FlateDecode>>");
2821 fStream->write(
"\r\nH\211<L;\016\2030\f\335}\212w\002\344$M\2323 1 \006\006\304\224vhU\220`\341\372<\aT\311\366\263\336o\023\207\017D\241pz\355\376\226\021+\251\226\344\027\017\034\244\321a\232\025/\211\n\316r\343ORh\262}\317\210\344\032o\310)\302\2233\245\252[m\274\332\313\277!$\332\371\371\210`N\242\267$\217\263\246\252W\257\245\006\351\345\024`\0o\347 \305\n", 124);
2828 PrintStr(
"<</Type/Pattern/Matrix[0.125 0 0 0.125 20 28]/PatternType 1/Resources");
2830 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 101 101]/XStep 100/YStep 100/Length 117/Filter/FlateDecode>>");
2833 fStream->write(
"\r\nH\211D\2151\n\2000\fE\367\234\342\037!)\224\336Ap\020\a\aq\323A\251\202.^\337$-\025\022^\372\033^n\022\354 \006CX\274\237\215&\\\032u\032\036\020\274\032\243\307\2740V]\027\234\024\242\"\033\2642En\324\312\224bc\262\\\230\377\301\332WM\224\212(U\221\375\265\301\025\016?\350\317P\215\221\033\213o\244\201>\001\006\0\031I'f\n", 119);
2840 PrintStr(
"<</Type/Pattern/Matrix[0.125 0 0 0.125 20 28]/PatternType 1/Resources");
2842 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 101 101]/XStep 100/YStep 100/Length 118/Filter/FlateDecode>>");
2845 fStream->write(
"\r\nH\211<\215=\n\204P\f\204\373\234b\216\220<\b\357\016\302\026ba!vZ(\273\v\332x}\223\274\237\"|\223a\230\271Hp\200\030\fa\211\273w\232\3617k0\363\204\3401\033\037,+c#\3170~\2244\304\327EV\243r\247\272oOcr\337\323]H\t\226\252\334\252r\255\362\257\213(\t\304\250\326\315T\267\032\275q\242\221^\001\006\0\272\367(&\n", 120);
2852 PrintStr(
"<</Type/Pattern/Matrix[0.06 0 0 0.06 20 28]/PatternType 1/Resources");
2854 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 169/Filter/FlateDecode>>");
2857 fStream->write(
"\r\nH\211<\220\273\n\0021\020E\373\371\212[[M\326\331\354\344\027\004\v\261\260\020;\025\224D\320\306\337w\036\254p\363\230\223\341$\344M\005\017\020\203Q8\307\347F'\274\f\355\f>Q\3605\214=\316\005\v.\214kt\217\230;)\324\366\245Fa\213e\320v\212r\022X\006\211Fi\3242\250J\224\302\020\367h\212\254I\\\325R\225o\03143\346U\235@a\t[\202Za\tA\202E`\351~O\002\235`\351~S\202\306h.m\253\264)\232K\217t\310\017q\354\a\353\247\364\377C\356\033\372\t0\0\bm:\375\n", 171);
2864 PrintStr(
"<</Type/Pattern/Matrix[0.125 0 0 0.125 20 28]/PatternType 1/Resources");
2866 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 100 100]/XStep 100/YStep 100/Length 280/Filter/FlateDecode>>");
2869 fStream->write(
"\r\nH\211DQ9N\004A\f\314\373\025\216\211\326\343v\037_@\"@\004\004\210\f\220@\003\022$|\177\335\345j\220v\345\251\303\343*\215\312\273\024\275\\d\375?\361dM\3162\306\337\214\337Y\336n\240m\217\036\301y\343\\<,i\250\0038F\035)\347l\322\026o\377\023\353|[\254\177\343\005;\315\317ky\224\257\240n\203\374\020\225\337\240\345N\236T\272<_\344\245\304^\3238\030\tc\236E\233xO\034\363\204>\251\317\324\233\023{\352\235\376\336S\357Fl\251\017\372\207\247>xoh&_\366Ud\331\253\314D\023\332\241\211\016\205\246\235\326\236*\275\307\204z8!s\031\335\306\\\306C\306\\\225\376\312\\\225\307\252\246\356\364\273Q\347\271:\371\341l\177\311e\210\3571\211\251#\374\302H\037:\342c\241\323\2617\320 \034\250\0\302\323a{\005%\302a\373(Zx\313\026\213@\215p\324}\026=\274e\217E8s\326}\026M\036\312}\271\n0\0\215\263\207\016\n", 282);
2876 PrintStr(
"<</Type/Pattern/Matrix[0.125 0 0 0.125 20 28]/PatternType 1/Resources");
2878 PrintStr(
" 0 R/PaintType 2/TilingType 1/BBox[0 0 101 101]/XStep 100/YStep 100/Length 54/Filter/FlateDecode>>");
2881 fStream->write(
"\r\nH\2112T\310T\3402P0P\310\34526P\0\242\034.s\004m\016\242\r\r\f\024@\030\302\002\321iZP\305`M\346\310\212\201R\0\001\006\0\206\322\017\200\n", 56);
2937 for (i = 0; i <
fNbUrl - 1; i++) {
2943 for (i = 0; i <
fNbUrl - 1; i++) {
2979 double W = 0.52 * fontsize * strlen(chars);
2980 double ascent = 0.72 * fontsize;
2981 double descent = 0.22 * fontsize;
2992 yShift = -(ascent - descent) / 2.0;
2996 double x2 = xShift + W;
2997 double y1 = -descent + yShift;
2998 double y2 = ascent + yShift;
3008 double bx1 = A * x1 + C * y1 + E;
3009 double by1 = B * x1 + D * y1 +
F;
3010 double bx2 = A * x2 + C * y1 + E;
3011 double by2 = B * x2 + D * y1 +
F;
3012 double bx3 = A * x2 + C * y2 + E;
3013 double by3 = B * x2 + D * y2 +
F;
3014 double bx4 = A * x1 + C * y2 + E;
3015 double by4 = B * x1 + D * y2 +
F;
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
short Width_t
Line width (short).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
short Color_t
Color number (short).
short Style_t
Style number (short).
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
const Int_t kObjPatternList
const Int_t kObjColorSpace
const Int_t kNumberOfFonts
const Int_t kObjFirstPage
const Int_t kObjPageResources
const Int_t kObjPatternResourses
const Int_t kObjTransList
externTVirtualPS * gVirtualPS
Style_t fFillStyle
Fill area style.
Color_t fFillColor
Fill area color.
Width_t fLineWidth
Line width.
Style_t fLineStyle
Line style.
Color_t fLineColor
Line color.
Color_t fMarkerColor
Marker color.
static Style_t GetMarkerStyleBase(Style_t style)
Size_t fMarkerSize
Marker size.
Style_t fMarkerStyle
Marker style.
static Width_t GetMarkerLineWidth(Style_t style)
Color_t fTextColor
Text color.
Float_t fTextAngle
Text angle.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
Font_t fTextFont
Text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Short_t fTextAlign
Text alignment.
Float_t fTextSize
Text size.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
UInt_t Convert(Bool_t toGMT=kFALSE) const
Convert fDatime from TDatime format to the standard time_t format.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Int_t GetEntries() const override
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const override
Collectable string class.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void SetLineStyle(Style_t linestyle=1) override
Change the line style.
void Off()
Deactivate an already open PDF file.
std::vector< int > fPageObjects
Page object numbers.
Int_t fCurrentPage
Object number of the current page.
void SetMarkerColor(Color_t cindex=1) override
Set color index for markers.
Int_t fType
Workstation type used to know if the PDF is open.
void SetColor(Int_t color=1)
Set color with its color index.
Double_t YtoPDF(Double_t y)
Convert Y from world coordinate to PDF.
void Open(const char *filename, Int_t type=-111) override
Open a PDF file.
void Close(Option_t *opt="") override
Close a PDF file.
std::vector< Int_t > fObjPos
Objects position.
TPDF()
Default PDF constructor.
void Range(Float_t xrange, Float_t yrange)
Set the range for the paper in centimetres.
Double_t fD
"d" value of the Current Transformation Matrix (CTM)
void LineTo(Double_t x, Double_t y)
Draw a line to a new position.
Bool_t fUrl
True when the text has an URL.
void SetLineCap(Int_t linecap=0)
Set the value of the global parameter TPDF::fgLineCap.
Double_t XtoPDF(Double_t x)
Convert X from world coordinate to PDF.
void WriteReal(Float_t r, Bool_t space=kTRUE) override
Write a Real number to the file.
Double_t fB
"b" value of the Current Transformation Matrix (CTM)
void SetLineJoin(Int_t linejoin=0)
Set the value of the global parameter TPDF::fgLineJoin.
Double_t CMtoPDF(Double_t u)
void CellArrayEnd() override
End the Cell Array painting.
void NewPage() override
Start a new PDF page.
Float_t fAlpha
Per cent of transparency.
Float_t fLineScale
Line width scale factor.
void SetFillColor(Color_t cindex=1) override
Set color index for fill areas.
Float_t fGreen
Per cent of green.
Int_t fNbUrl
Number of URLs in the current page.
Int_t fPageOrientation
Page orientation (Portrait, Landscape).
void On()
Activate an already open PDF file.
Bool_t fObjectIsOpen
True if an object is opened.
Int_t fStartStream
Stream start.
Double_t fE
"e" value of the Current Transformation Matrix (CTM)
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Draw a Box.
void SetLineColor(Color_t cindex=1) override
Set color index for lines.
void ComputeRect(const char *chars, Double_t fontsize, Double_t a, Double_t b, Double_t c, Double_t d, Double_t e, Double_t f)
Compute the Rect for url.
void FontEncode()
Font encoding.
Bool_t fCompress
True when fBuffer must be compressed.
static Int_t fgLineCap
Appearance of line caps.
void TextUrl(Double_t x, Double_t y, const char *string, const char *url) override
Draw text with URL.
void DrawPS(Int_t n, Float_t *xw, Float_t *yw) override
Draw a PolyLine.
Float_t fYsize
Page size along Y.
Double_t UtoPDF(Double_t u)
Convert U from NDC coordinate to PDF.
std::vector< std::string > fUrls
URLs.
std::vector< float > fRectY1
y1 /Rect coordinates for url annots
void SetAlpha(Float_t alpha=1.)
Set the alpha channel value.
Float_t fRed
Per cent of red.
std::vector< float > fRectY2
y2 /Rect coordinates for url annots
Int_t fPageFormat
Page format (A4, Letter etc ...).
Bool_t fRange
True when a range has been defined.
std::vector< float > fRectX1
x1 /Rect coordinates for url annots
void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y) override
Draw markers at the n WC points xw, yw.
std::vector< float > fRectX2
x2 /Rect coordinates for url annots
Float_t fBlue
Per cent of blue.
std::vector< float > fAlphas
List of alpha values used.
void MoveTo(Double_t x, Double_t y)
Move to a new position.
void SetLineScale(Float_t scale=1)
void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t mode, Int_t border, Int_t dark, Int_t light) override
Draw a Frame around a box.
Double_t fC
"c" value of the Current Transformation Matrix (CTM)
void CellArrayFill(Int_t r, Int_t g, Int_t b) override
Paint the Cell Array.
~TPDF() override
Default PDF destructor.
void WriteUrlObjects()
Write the annotation objects containing the URLs.
void EnsureBufferSize(Int_t required_size)
Ensure that required space in the buffer is available.
Double_t fA
"a" value of the Current Transformation Matrix (CTM)
void EndObject()
Close the current opened object.
void PrintStr(const char *string="") override
Output the string str in the output buffer.
Int_t fNbPage
Number of pages.
void SetFillPatterns(Int_t ipat, Int_t color)
Set the fill patterns (1 to 25) for fill areas.
void WriteCM(Double_t a, Double_t b, Double_t c, Double_t d, Double_t e, Double_t f, Bool_t acc=kTRUE)
Write and Accumulate (if acc is true) the Current Transformation Matrix (CTM).
void SetTextColor(Color_t cindex=1) override
Set color index for text.
void DrawPolyLineNDC(Int_t n, TPoints *uv)
Draw a PolyLine in NDC space.
Float_t fXsize
Page size along X.
void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2) override
Begin the Cell Array painting.
void DrawHatch(Float_t dy, Float_t angle, Int_t n, Float_t *x, Float_t *y)
Draw Fill area with hatch styles.
void SetLineWidth(Width_t linewidth=1) override
Change the line width.
Double_t VtoPDF(Double_t v)
Convert V from NDC coordinate to PDF.
Bool_t fPageNotEmpty
True if the current page is not empty.
void NewObject(Int_t n)
Create a new object in the PDF file.
void DrawPolyLine(Int_t n, TPoints *xy)
Draw a PolyLine.
void Text(Double_t x, Double_t y, const char *string) override
Draw text.
void PatternEncode()
Patterns encoding.
Double_t fF
"f" value of the Current Transformation Matrix (CTM)
void WriteCompressedBuffer()
Write the buffer in a compressed way.
void TextNDC(Double_t u, Double_t v, const char *string)
Write a string of characters in NDC.
static Int_t fgLineJoin
Appearance of joining lines.
void PrintFast(Int_t nch, const char *string="") override
Fast version of Print.
2-D graphics point (world coordinates).
static char * ReAllocChar(char *vp, size_t size, size_t oldsize)
Reallocate (i.e.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual void GetTextAdvance(UInt_t &a, const char *text, const Bool_t kern=kTRUE) const
virtual void GetTextExtent(UInt_t &w, UInt_t &h, const char *text) const
virtual void WriteInteger(Int_t i, Bool_t space=kTRUE)
Write one Integer to the file.
void CloseStream()
Close existing stream.
virtual void PrintStr(const char *string="")
Output the string str in the output buffer.
virtual void PrintFast(Int_t nch, const char *string="")
Fast version of Print.
Bool_t OpenStream(const char *fname, Bool_t binary=kFALSE)
Open output stream.
void ClearBuffer()
Clear content of internal buffer.
TVirtualPS(const TVirtualPS &)=delete
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.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.