blob: f294944ba21808a2a20d57fbd776540237b28811 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
}
|