diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-09-27 13:51:53 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-09-27 13:51:53 -0400 |
commit | bb7de78222a2c95e8a5c97c3b0400d0bf3d7510e (patch) | |
tree | 10243c5ae3d16d01cf2a2cf8a165e85bbb904d68 | |
parent | dfcef130d229234f830d85b20b7749c5b35b9be7 (diff) |
Remove cairo bits.
Now that we have unit-trace, the cairo effort in this repo is probably
not gonna be worked on for a while. Since this causes compilation issues
let's remove it for now.
-rw-r--r-- | SConstruct | 6 | ||||
-rw-r--r-- | src/cairo_test.c | 41 |
2 files changed, 0 insertions, 47 deletions
@@ -24,14 +24,8 @@ env = Environment( | |||
24 | CPPDEFINES = '-DMAX_TASKS=%d' % MAX_TASKS, | 24 | CPPDEFINES = '-DMAX_TASKS=%d' % MAX_TASKS, |
25 | ) | 25 | ) |
26 | 26 | ||
27 | # Link with libcairo. For now without sched_trace support. | ||
28 | cairo = env.Clone() | ||
29 | cairo.ParseConfig('pkg-config --cflags --libs cairo') | ||
30 | |||
31 | # ##################################################################### | 27 | # ##################################################################### |
32 | # Targets: sched_trace tools | 28 | # Targets: sched_trace tools |
33 | common = ['src/load.c', 'src/eheap.c', 'src/util.c'] | 29 | common = ['src/load.c', 'src/eheap.c', 'src/util.c'] |
34 | env.Program('st_convert', ['src/st2pl.c'] + common) | 30 | env.Program('st_convert', ['src/st2pl.c'] + common) |
35 | env.Program('st_show', ['src/showst.c'] + common) | 31 | env.Program('st_show', ['src/showst.c'] + common) |
36 | |||
37 | cairo.Program('cairo_test', ['src/cairo_test.c']) | ||
diff --git a/src/cairo_test.c b/src/cairo_test.c deleted file mode 100644 index 9c3683a..0000000 --- a/src/cairo_test.c +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | |||
4 | #include <cairo.h> | ||
5 | |||
6 | static double in2pts(double in) | ||
7 | { | ||
8 | /* 72 pts per inch */ | ||
9 | return in * 72; | ||
10 | } | ||
11 | |||
12 | static double cm2in(double cm) | ||
13 | { | ||
14 | /* 1in = 2.54 cm */ | ||
15 | return cm / 2.54; | ||
16 | } | ||
17 | |||
18 | static double cm2pts(double cm) | ||
19 | { | ||
20 | return in2pts(cm2in(cm)); | ||
21 | } | ||
22 | |||
23 | void cairo_test(void) | ||
24 | { | ||
25 | cairo_surface_t *surface; | ||
26 | cairo_t *cr; | ||
27 | |||
28 | surface = cairo_pdf_surface_create("test.pdf", cm2pts(10), cm2pts(10)); | ||
29 | cr = cairo_create(surface); | ||
30 | cairo_set_source_rgb(cr, 1.0, 0.3, 0.7); | ||
31 | cairo_rectangle(cr, cm2pts(0.25), cm2pts(0.25), cm2pts(0.5), cm2pts(0.5)); | ||
32 | cairo_fill(cr); | ||
33 | cairo_destroy(cr); | ||
34 | cairo_surface_destroy(surface); | ||
35 | } | ||
36 | |||
37 | int main (int argc, char** argv) | ||
38 | { | ||
39 | cairo_test(); | ||
40 | return 0; | ||
41 | } | ||