| 681 | } |
| 682 | |
| 683 | void plotstring (const char * string) |
| 684 | { int lx,l = strlen(string); |
| 685 | XDrawString(display, win, gc, currx, curry , string, l); |
| 686 | lx = XTextWidth( font_info,string,l); |
| 687 | if(psfile) fprintf(psfile,"(%s) %d %d S\n",string,currx,height-curry); |
| 688 | // add by fujiwara |
| 689 | if( pdffile ){ |
| 690 | pdffile_content << "BT /F1 " << 9 << " Tf" << std::endl; // 9*pdf_s : text font size |
| 691 | pdffile_content << "1 0 0 1 " << currx*pdf_s << ' ' << (height-curry)*pdf_s << " Tm" << std::endl; |
| 692 | pdffile_content << "(" << string << ") Tj ET" << std::endl; |
| 693 | } |
| 694 | if( svgfile ){ |
| 695 | fprintf(svgfile,"<text x=\"%.2f\" y=\"%.2f\">%s</text>\n",currx*svg_s,curry*svg_s,string); |
| 696 | } |
| 697 | currx += lx; |
| 698 | } |
| 699 | |
| 700 | void showgraphic() |
| 701 | { |