------- Comment #5 from pinskia at gcc dot gnu dot org  2008-09-11 22:11 -------
And the other:
typedef struct {
    short rbearing;
    short width;
} XCharStruct;
typedef long I32;
typedef I32 Bool;
typedef unsigned long Handle;
typedef struct _Point {
 int x;
 int y;
} Point, *PPoint;
static Point
gp_get_text_overhangs( Handle self, const char *text, int len, Bool wide)
{
   Point ret;
   if ( len > 0)
{
      XCharStruct * cs;
      cs = prima_char_struct( );
      ret. x = ( cs-> rbearing < 0) ? - cs-> rbearing: 0;
      ret. y = (( cs-> width - cs-> rbearing) < 0) ? cs-> rbearing - cs-> width
: 0;
   }
 else
      ret. x = ret. y = 0;
   return ret;
}
void gp_get_text_box( Handle self, const char * text, int len, Bool wide)
{
   Point * pt = ( Point *) malloc( sizeof( Point) * 5);
   int x;
   Point ovx;
   ovx = gp_get_text_overhangs( self, text, len, wide);
   pt[2]. x = x + ovx. y;
  pt[1]. x = - ovx. x;
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37483

Reply via email to