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

Function plot

src/Graphics/ffglut.cpp:3272–3300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3270}
3271
3272void plot(double xx,double yy,const char *cmm,int font)
3273{
3274 glRasterPos2f(xx,yy);
3275 float x[4];
3276 glGetFloatv(GL_CURRENT_RASTER_POSITION,x);
3277 if((debug > 10)) cout<<"avant x : "<<x[0]<<" y : "<<x[1]<<" z : "<<x[2]<< " " << xx <<" " << yy << endl;
3278 void * glut_font=GLUT_BITMAP_HELVETICA_18;
3279 if(kscreenscale==2) glut_font=GLUT_BITMAP_TIMES_ROMAN_24;
3280 switch (font)
3281 {
3282 case 0: glut_font=GLUT_STROKE_ROMAN;break;
3283 case 1: glut_font=GLUT_STROKE_MONO_ROMAN;break;
3284 case 2: glut_font=GLUT_BITMAP_9_BY_15;break;
3285 case 3: glut_font=GLUT_BITMAP_8_BY_13;break;
3286 case 4: glut_font=GLUT_BITMAP_TIMES_ROMAN_10;break;
3287 case 5: glut_font=GLUT_BITMAP_TIMES_ROMAN_24;break;
3288 case 6: glut_font=GLUT_BITMAP_HELVETICA_10;break;
3289 case 7: glut_font=GLUT_BITMAP_HELVETICA_12;break;
3290 case 8: glut_font=GLUT_BITMAP_HELVETICA_18;break;
3291
3292
3293
3294 }
3295 for (const char *s=cmm; *s; s++)
3296 {if((debug > 10)) cout << *s ;
3297 glutBitmapCharacter(glut_font,*s);
3298 }
3299 if((debug > 10)) cout << " ;;; " <<endl;
3300}
3301void plot(double x,double y,double i,int font)
3302{
3303 char buf[24];

Callers 3

ShowMethod · 0.70
PlotValueMethod · 0.70
DrawCommentaireMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected