/* Last edited on 2002-03-15 09:53:26 by stolfi */ void psplot_print ( PSPLOT *p, char *txt, char *font, double font_size, double x_align ) { if (! p->page_started) { psplot_error("must call begin_page first"); } pswrite_set_font(p->file, font, font_size); /* Write caption, line by line: */ { double x_caption_PS = ((double)x_align)*(p->x_max_PS - p->x_min_PS); char *start = txt; char *stop; char c; while (*start != '\0') { stop = start + 1; while ((*stop != '\0') && (*stop != '\n')) { stop++; } c = *stop; *stop = '\0'; pswrite_label(p->file, start, x_caption_PS, p->y_caption_PS, x_align, 1.0, 0.0 ); *stop = c; p->y_caption_PS = p->y_caption_PS - ((double)size) * MM_PER_POINT; start = stop; if (c == '\n') { start++; } } } }