2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief Paint chordal graphs.
9 * @author Sebastian Hack
12 #ifndef FIRM_BE_BECHORDAL_DRAW_H
13 #define FIRM_BE_BECHORDAL_DRAW_H
15 #include "bechordal.h"
17 typedef struct plotter_t plotter_t;
18 typedef struct plotter_if_t plotter_if_t;
19 typedef struct rect_t rect_t;
20 typedef struct draw_chordal_opts_t draw_chordal_opts_t;
21 typedef struct color_t color_t;
32 void (*begin)(plotter_t *self, const rect_t *visible_area);
34 void (*set_color)(plotter_t *self, const color_t * color);
35 const color_t *(*get_color)(const plotter_t *self);
36 void (*set_width)(plotter_t *self, int width);
37 int (*get_width)(const plotter_t *self);
38 void (*line)(plotter_t *self, int x1, int y1, int x2, int y2);
39 void (*box)(plotter_t *self, const rect_t *rect);
40 void (*text)(plotter_t *self, int x, int y, const char *str);
42 void (*finish)(plotter_t *self);
43 void (*free)(plotter_t *self);
46 extern void plotter_free(plotter_t *self);
49 const plotter_if_t *vtab;
52 struct draw_chordal_opts_t {
61 extern const draw_chordal_opts_t draw_chordal_def_opts;
63 extern plotter_t *new_plotter_ps(const char *filename);
65 extern void draw_interval_tree(const draw_chordal_opts_t *opts, const be_chordal_env_t *chordal_env, plotter_t *plotter);
67 #endif /* FIRM_BE_BECHORDAL_DRAW_H */