MCPcopy Create free account
hub / github.com/FreeFem/FreeFem-sources / plotstring

Function plotstring

src/Graphics/Xrgraph.cpp:683–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

681}
682
683void 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
700void showgraphic()
701{

Callers 8

PutLevelFunction · 0.70
ShowHelpFunction · 0.70
ShowFunction · 0.50
plotFunction · 0.50
PlotValueFunction · 0.50
DrawCommentaireFunction · 0.50
DrawMethod · 0.50
ShowFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected