37 } mem; |
40 } mem; |
38 } out; |
41 } out; |
39 }; |
42 }; |
40 |
43 |
41 /** |
44 /** |
|
45 * Alloc a new pt_tile, which must be initialized using pt_tile_init_* |
|
46 */ |
|
47 int pt_tile_new (struct pt_tile **tile_ptr); |
|
48 |
|
49 /** |
42 * Initialize to render with given params, writing output to given FILE* |
50 * Initialize to render with given params, writing output to given FILE* |
43 */ |
51 */ |
44 int pt_tile_init_file (struct pt_tile *tile, const struct pt_tile_info *info, FILE *out); |
52 int pt_tile_init_file (struct pt_tile *tile, struct pt_cache *cache, const struct pt_tile_info *info, FILE *out); |
45 |
53 |
46 /** |
54 /** |
47 * Initialize to render with given params, writing output to a memory buffer |
55 * Initialize to render with given params, writing output to a memory buffer |
48 */ |
56 */ |
49 int pt_tile_init_mem (struct pt_tile *tile, const struct pt_tile_info *info); |
57 int pt_tile_init_mem (struct pt_tile *tile, struct pt_cache *cache, const struct pt_tile_info *info); |
50 |
58 |
51 /** |
59 /** |
52 * Render PNG data from given cache according to parameters given to pt_tile_init_* |
60 * Render PNG data from given cache according to parameters given to pt_tile_init_* |
53 */ |
61 */ |
54 int pt_tile_render (struct pt_tile *tile, struct pt_cache *cache); |
62 int pt_tile_render (struct pt_tile *tile); |
55 |
63 |
56 /** |
64 /** |
57 * Abort any failed render process, cleaning up. |
65 * Abort any failed render process, cleaning up. |
58 */ |
66 */ |
59 void pt_tile_abort (struct pt_tile *tile); |
67 void pt_tile_abort (struct pt_tile *tile); |
60 |
68 |
|
69 /** |
|
70 * Destroy given pt_tile, aborting it and freeing it |
|
71 */ |
|
72 void pt_tile_destroy (struct pt_tile *tile); |
|
73 |
61 #endif |
74 #endif |