diff options
Diffstat (limited to 'experimental/tectonics/tectonics.c')
-rw-r--r-- | experimental/tectonics/tectonics.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/experimental/tectonics/tectonics.c b/experimental/tectonics/tectonics.c new file mode 100644 index 0000000..f294944 --- /dev/null +++ b/experimental/tectonics/tectonics.c @@ -0,0 +1,24 @@ +#include <cairo.h> + +#include "tectonics.h" + +#define X_RES 512 +#define Y_RES X_RES + +int main() +{ + cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, X_RES, Y_RES); + cairo_t *cr = cairo_create(surface); + + struct world_t world; + create_world(&world, 1000); + if (world.points == NULL) + return 1; + render_world(cr, &world); + free_world(&world); + + cairo_destroy(cr); + cairo_surface_write_to_png(surface, "output.png"); + cairo_surface_destroy(surface); + return 0; +} |