return ok;
}
-/* Link the image contained in FILE_NAME to the
- HTML stream in FILE. */
-static void
-link_image (FILE *file, char *file_name)
-{
- fprintf (file, "<IMG SRC=\"%s\"/>", file_name);
- }
-
/* Generic option types. */
enum
{
{
struct html_driver_ext *x = this->ext;
char *file_name;
- plPlotter *lp;
-
- /* Draw chart in separate file. */
- if (!chart_create_file ("png", x->chart_file_name, x->chart_cnt,
- NULL, &file_name, &lp))
- return;
- x->chart_cnt++;
- chart_draw (chart, lp);
- pl_deletepl_r (lp);
-
- link_image (x->file, file_name);
+ file_name = chart_draw_png (chart, x->chart_file_name, x->chart_cnt++);
+ fprintf (x->file, "<IMG SRC=\"%s\"/>", file_name);
free (file_name);
}