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
18 typedef struct _plotter_t plotter_t;
19 typedef struct _plotter_if_t plotter_if_t;
20 typedef struct _rect_t rect_t;
21 typedef struct _draw_chordal_opts_t draw_chordal_opts_t;
22 typedef struct _color_t color_t;
32 struct _plotter_if_t {
33 void (*begin)(plotter_t *self, const rect_t *visible_area);
35 void (*set_color)(plotter_t *self, const color_t * color);
36 const color_t * (*get_color)(const plotter_t *self);
37 void (*set_width)(plotter_t *self, int width);
38 int (*get_width)(const plotter_t *self);
39 void (*line)(plotter_t *self, int x1, int y1, int x2, int y2);
40 void (*box)(plotter_t *self, const rect_t *rect);
41 void (*text)(plotter_t *self, int x, int y, const char *str);
43 void (*finish)(plotter_t *self);
44 void (*free)(plotter_t *self);
47 extern void plotter_free(plotter_t *self);
50 const plotter_if_t *vtab;
53 struct _draw_chordal_opts_t {
62 extern const draw_chordal_opts_t draw_chordal_def_opts;
64 extern plotter_t *new_plotter_ps(const char *filename);
66 extern void draw_interval_tree(
67 const draw_chordal_opts_t *opts,
68 const be_chordal_env_t *chordal_env,
71 #endif /* _BECHORDAL_DRAW_H */