244 std::vector<std::string>::const_iterator it;
246 if((*it).size()) {empty =
false;
break;}
250 if((*it).size()) {empty =
false;
break;}
258 rgba* mat =
new rgba();
263 draw_style* ds =
new draw_style;
273 base_text* ltext = 0;
276 {separator*
sep =
new separator;
281 text_hershey* text =
new text_hershey;
299 base_text* rtext = 0;
302 {separator*
sep =
new separator;
307 text_hershey* text =
new text_hershey;
325 base_text* mtext = 0;
328 text_hershey* text =
new text_hershey;
330 text->strings.add(s);
336 text->strings.add(s);
353 {
float mn_x,mn_y,mn_z;
354 float mx_x,mx_y,mx_z;
355 ltext->get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
356 float bxh = mx_y-mn_y;
370 {
float mn_x,mn_y,mn_z;
371 float mx_x,mx_y,mx_z;
372 ltext->get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
373 float lw = mx_x-mn_x;
374 float xtrans = (fw-lw)*0.5f;
375 float xx = -(mn_x+mx_x)*0.5F-xtrans;
376 float yy = -(mn_y+mx_y)*0.5F;
377 ltsf->set_translate(xx,yy,zz);}
379 {
float mn_x,mn_y,mn_z;
380 float mx_x,mx_y,mx_z;
381 rtext->get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
382 rtext->hjust =
right;
384 float yy = -(mn_y+mx_y)*0.5F;
385 rtsf->set_translate(xx,yy,zz);}
400 float lmn_x,lmn_y,lmn_z;
401 float lmx_x,lmx_y,lmx_z;
402 ltext->get_bounds(th,lmn_x,lmn_y,lmn_z,lmx_x,lmx_y,lmx_z);
403 float lw = (lmx_x<lmn_x)?0:lmx_x-lmn_x;
405 float rmn_x,rmn_y,rmn_z;
406 float rmx_x,rmx_y,rmx_z;
407 rtext->get_bounds(th,rmn_x,rmn_y,rmn_z,rmx_x,rmx_y,rmx_z);
408 float rw = (rmx_x<rmn_x)?0:rmx_x-rmn_x;
410 float mmn_x,mmn_y,mmn_z;
411 float mmx_x,mmx_y,mmx_z;
412 mtext->get_bounds(th,mmn_x,mmn_y,mmn_z,mmx_x,mmx_y,mmx_z);
413 float mw = (mmx_x<mmn_x)?0:mmx_x-mmn_x;
415 float winfos = lw+mw+rw;
432 ltext->get_bounds(th,lmn_x,lmn_y,lmn_z,lmx_x,lmx_y,lmx_z);
433 float hinfos = (lmx_x<lmn_x)?0:lmx_y-lmn_y;
436 float ty = -ltext->ascent(th)+hinfos*0.5f;
437 ltsf->set_translate(xx,ty,zz);
440 if(rtext->hjust==
right) {
442 }
else if(rtext->hjust==
left) {
443 rtext->get_bounds(th,rmn_x,rmn_y,rmn_z,rmx_x,rmx_y,rmx_z);
444 rw = (rmx_x<rmn_x)?0:rmx_x-rmn_x;
447 rtext->get_bounds(th,rmn_x,rmn_y,rmn_z,rmx_x,rmx_y,rmx_z);
448 rw = (rmx_x<rmn_x)?0:rmx_x-rmn_x;
449 xx = fw*0.5F-rw*0.5F;
451 rtsf->set_translate(xx,ty,zz);