GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
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_dump_map_row_sparse(struct BM *, int)
Debugging code to dump out structure of links for single row.
Definition: sparse.c:334
size_t BM_get_map_size(struct BM *)
Returns size in bytes that bitmap is taking up.
Definition: bitmap.c:248
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:152
int BM_set(struct BM *, int, int, int)
Sets bitmap value to 'val' at location 'x' 'y'.
Definition: bitmap.c:190
struct BM * BM_file_read(FILE *)
Create map structure and load it from file.
Definition: bitmap.c:316
Definition: bitmap.h:17
int BM_destroy(struct BM *)
Destroy bitmap and free all associated memory.
Definition: bitmap.c:93
int BM_set_sparse(struct BM *, int, int, int)
Set sparse bitmap value to 'val' at location 'x'/'y'.
Definition: sparse.c:131
int BM_file_write(FILE *, struct BM *)
Write bitmap out to file.
Definition: bitmap.c:272
int BM_dump_map_sparse(struct BM *)
Debugging code to dump out structure of links.
Definition: sparse.c:304
int BM_destroy_sparse(struct BM *)
Destroy sparse bitmap and free all associated memory.
Definition: sparse.c:93
int BM_get(struct BM *, int, int)
Gets 'val' from the bitmap.
Definition: bitmap.c:223
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:366
struct BM * BM_create(int, int)
Create bitmap of dimension x/y and return structure token.
Definition: bitmap.c:60
struct BM * BM_create_sparse(int, int)
Create a sparse bitmap of dimension 'x'/'y'.
Definition: sparse.c:44
int BM_get_sparse(struct BM *, int, int)
Returns sparse bitmap value at location 'x'/'y'.
Definition: sparse.c:248
size_t BM_get_map_size_sparse(struct BM *)
Returns size of sparse bitmap in bytes.
Definition: sparse.c:274