0
|
1 |
#ifndef PNGTILE_H
|
|
2 |
#define PNGTILE_H
|
|
3 |
|
|
4 |
/**
|
|
5 |
* @file
|
|
6 |
*
|
|
7 |
* Tile-based access to large PNG images.
|
|
8 |
*/
|
|
9 |
|
|
10 |
/**
|
|
11 |
* "Global" context shared between images
|
|
12 |
*/
|
|
13 |
struct pt_ctx;
|
|
14 |
|
|
15 |
/**
|
|
16 |
* Per-image state
|
|
17 |
*/
|
|
18 |
struct pt_image;
|
|
19 |
|
|
20 |
enum pt_image_mode {
|
|
21 |
PT_IMG_READ = 0x01,
|
|
22 |
PT_IMG_WRITE = 0x02,
|
|
23 |
};
|
|
24 |
|
|
25 |
|
|
26 |
int pt_ctx_new (struct pt_ctx **ctx_ptr);
|
|
27 |
|
|
28 |
/**
|
|
29 |
* Open a new pt_image for use.
|
|
30 |
*
|
|
31 |
* @param img_ptr returned pt_image handle
|
|
32 |
* @param ctx global state to use
|
|
33 |
* @param path filesystem path to .png file
|
|
34 |
* @param mode combination of PT_IMG_* flags
|
|
35 |
*/
|
|
36 |
int pt_image_open (struct pt_image **img_ptr, struct pt_ctx *ctx, const char *png_path, int cache_mode);
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
#endif
|