# include "Ximage.h"
  
void DrawPtext (Layout *layout) {
  
  int i, x, y, size;
  double angle;
  char *fontname;

  fontname = GetRotFont (&size);
  XSetForeground (graphic.display, graphic.gc, graphic.fore);
  DrawRotTextInit (graphic.display, graphic.window, graphic.gc, graphic.fore, graphic.back);

  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 = layout[0].ptext[i].y;
      SetRotFont (layout[0].ptext[i].font, layout[0].ptext[i].size);
      DrawRotText (x, y, layout[0].ptext[i].text, 5, angle);
    }
  }
  SetRotFont (fontname, size);
}

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

  */
