3 * @file bechordal_draw.h
5 * @author Sebastian Hack
7 * Drawing chordal graphs.
9 * Copyright (C) 2005 Universitaet Karlsruhe
10 * Released under the GPL
13 #ifndef _BECHORDAL_DRAW_H
14 #define _BECHORDAL_DRAW_H
19 typedef struct _plotter_t plotter_t;
20 typedef struct _plotter_if_t plotter_if_t;
21 typedef struct _rect_t rect_t;
22 typedef struct _draw_chordal_opts_t draw_chordal_opts_t;
23 typedef struct _color_t color_t;
33 struct _plotter_if_t {
34 void (*begin)(plotter_t *self, const rect_t *visible_area);
36 void (*set_color)(plotter_t *self, const color_t * color);
37 const color_t * (*get_color)(const plotter_t *self);
38 void (*set_width)(plotter_t *self, int width);
39 int (*get_width)(const plotter_t *self);
40 void (*line)(plotter_t *self, int x1, int y1, int x2, int y2);
41 void (*box)(plotter_t *self, const rect_t *rect);
42 void (*text)(plotter_t *self, int x, int y, const char *str);
44 void (*finish)(plotter_t *self);
45 void (*free)(plotter_t *self);
48 extern void plotter_free(plotter_t *self);
51 const plotter_if_t *vtab;
54 struct _draw_chordal_opts_t {
63 extern const draw_chordal_opts_t draw_chordal_def_opts;
65 extern plotter_t *new_plotter_ps(const char *filename);
67 extern void draw_interval_tree(
68 const draw_chordal_opts_t *opts,
69 const be_chordal_env_t *chordal_env,
72 #endif /* _BECHORDAL_DRAW_H */