becopyopt: Remove the unnecessary attribute name from struct copy_opt_t.
[libfirm] / ir / be / bechordal_draw.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief       Paint chordal graphs.
9  * @author      Sebastian Hack
10  * @date        12.05.2005
11  */
12 #ifndef FIRM_BE_BECHORDAL_DRAW_H
13 #define FIRM_BE_BECHORDAL_DRAW_H
14
15 #include "bechordal.h"
16
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;
22
23 struct color_t {
24         double r, g, b;
25 };
26
27 struct rect_t {
28         int x, y, w, h;
29 };
30
31 struct plotter_if_t {
32         void (*begin)(plotter_t *self, const rect_t *visible_area);
33
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);
41
42         void (*finish)(plotter_t *self);
43         void (*free)(plotter_t *self);
44 };
45
46 extern void plotter_free(plotter_t *self);
47
48 struct plotter_t {
49         const plotter_if_t *vtab;
50 };
51
52 struct draw_chordal_opts_t {
53         int h_gap;
54         int h_inter_gap;
55         int v_gap;
56         int v_inter_gap;
57         int x_margin;
58         int y_margin;
59 };
60
61 extern const draw_chordal_opts_t draw_chordal_def_opts;
62
63 extern plotter_t *new_plotter_ps(const char *filename);
64
65 extern void draw_interval_tree(const draw_chordal_opts_t *opts, const be_chordal_env_t *chordal_env, plotter_t *plotter);
66
67 #endif /* FIRM_BE_BECHORDAL_DRAW_H */