GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-57a646b4a4
defs/bitmap.h
Go to the documentation of this file.
1 #ifndef GRASS_BITMAPDEFS_H
2 #define GRASS_BITMAPDEFS_H
3 
4 /* bitmap.c */
5 struct BM *BM_create(int, int);
6 int BM_destroy(struct BM *);
7 int BM_set_mode(int, int);
8 int BM_set(struct BM *, int, int, int);
9 int BM_get(struct BM *, int, int);
10 size_t BM_get_map_size(struct BM *);
11 int BM_file_write(FILE *, struct BM *);
12 struct BM *BM_file_read(FILE *);
13 
14 /* sparse.c */
15 struct BM *BM_create_sparse(int, int);
16 int BM_destroy_sparse(struct BM *);
17 int BM_set_sparse(struct BM *, int, int, int);
18 int BM_get_sparse(struct BM *, int, int);
19 size_t BM_get_map_size_sparse(struct BM *);
20 int BM_dump_map_sparse(struct BM *);
21 int BM_dump_map_row_sparse(struct BM *, int);
22 int BM_file_write_sparse(FILE *, struct BM *);
23 
24 #endif /* GRASS_BITMAPDEFS_H */
int BM_get(struct BM *, int, int)
Gets 'val' from the bitmap.
Definition: bitmap.c:217
int BM_file_write(FILE *, struct BM *)
Write bitmap out to file.
Definition: bitmap.c:264
int BM_dump_map_row_sparse(struct BM *, int)
Debugging code to dump out structure of links for single row.
Definition: sparse.c:323
struct BM * BM_create_sparse(int, int)
Create a sparse bitmap of dimension 'x'/'y'.
Definition: sparse.c:42
int BM_destroy(struct BM *)
Destroy bitmap and free all associated memory.
Definition: bitmap.c:89
size_t BM_get_map_size(struct BM *)
Returns size in bytes that bitmap is taking up.
Definition: bitmap.c:241
int BM_set(struct BM *, int, int, int)
Sets bitmap value to 'val' at location 'x' 'y'.
Definition: bitmap.c:185
int BM_set_sparse(struct BM *, int, int, int)
Set sparse bitmap value to 'val' at location 'x'/'y'.
Definition: sparse.c:125
size_t BM_get_map_size_sparse(struct BM *)
Returns size of sparse bitmap in bytes.
Definition: sparse.c:265
int BM_file_write_sparse(FILE *, struct BM *)
Write sparse bitmap matrix out to disk file 'fp'. NOTE: 'fp' must already be opened and later closed ...
Definition: sparse.c:354
int BM_dump_map_sparse(struct BM *)
Debugging code to dump out structure of links.
Definition: sparse.c:294
int BM_set_mode(int, int)
Specify the type of data structure to use for bitmap. 'mode' can be either BM_FLAT or BM_SPARSE:
Definition: bitmap.c:147
int BM_get_sparse(struct BM *, int, int)
Returns sparse bitmap value at location 'x'/'y'.
Definition: sparse.c:240
int BM_destroy_sparse(struct BM *)
Destroy sparse bitmap and free all associated memory.
Definition: sparse.c:88
struct BM * BM_file_read(FILE *)
Create map structure and load it from file.
Definition: bitmap.c:306
struct BM * BM_create(int, int)
Create bitmap of dimension x/y and return structure token.
Definition: bitmap.c:58
Definition: bitmap.h:17