using Font Manager routine in graphic object

Mary Vickerman vvmbw at sargent.lerc.nasa.gov
Fri Mar 29 06:23:30 AEST 1991


I'm having problems creating a graphical object that contains
a string created with the font manager routines (fmprstr).
If I don't put the string in an object, it displays fine.
But if I put it in an object, the string is not displayed
when I do callob.  Is this one of those routines that you
can't use in an object?  (It didn't say so in the manual.)
Here's what my code lloks like when it works.  Put the calls
to makeobj, closeobj, and callobj back in, and "Hello..."
doesn't print:

#include "gl.h"
#include "device.h"
#include "fmclient.h"
main()
{
  Object objnum;
  short val;

  fmfonthandle f1,f25;
  prefsize(240,210); 
  winopen("Hello");
/*  makeobj(objnum=genobj()); */
  color(BLACK);
  clear();
  color(GREEN);
  fminit();
  if ((f1 =fmfindfont("Times-Roman")) == 0) exit(1);
  f25 = fmscalefont(f1,25.0);
  fmsetfont(f25);
  cmov2i(30,100);
  fmprstr("Hello World");
  cmov2i(30,50);
  charstr("Goodbye World");
/*  closeobj(); */
/*  callobj(objnum); */
  sleep(2);
  exit;
}


Any ideas?  Post or email.  Thanks. 
--
-----------------------------------------------------------------------
Mary B. Vickerman    vvmbw at sargent.lerc.nasa.gov   (128.156.1.92)
Computer Graphics Branch,  NASA Lewis Research Center,  Cleveland, OH
(216) 433-5067



More information about the Comp.sys.sgi mailing list