# include "Ximage.h"
  
void PSPtext (Layout *layout, FILE *f) {

  int i, width, pos, x, y, size;
  double angle;
  char *fontname;

  fontname = GetRotFont (&size);
  for (i = 0; i < layout[0].Nptext; i++) {
    if (strcmp (layout[0].ptext[i].text, "")) {
      angle = layout[0].ptext[i].angle;
      x = layout[0].ptext[i].x;
      y = graphic.dy - layout[0].ptext[i].y;
      SetRotFont (layout[0].ptext[i].font, layout[0].ptext[i].size);
      PSRotText (f, x, y, layout[0].ptext[i].text, 5, angle);
    }
  }
  SetRotFont (fontname, size);
}

  /* pos values
            
 4____2___5 
  |       | 
  |       | 
 1|   8   |3
  |       |
  |       |
  ---------
  6   0   7

  */
