GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
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:332
size_t BM_get_map_size(struct BM *)
Returns size in bytes that bitmap is taking up.
Definition: bitmap.c:245
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:149
int BM_set(struct BM *, int, int, int)
Sets bitmap value to 'val' at location 'x' 'y'.
Definition: bitmap.c:187
struct BM * BM_file_read(FILE *)
Create map structure and load it from file.
Definition: bitmap.c:313
Definition: bitmap.h:17
int BM_destroy(struct BM *)
Destroy bitmap and free all associated memory.
Definition: bitmap.c:90
int BM_set_sparse(struct BM *, int, int, int)
Set sparse bitmap value to 'val' at location 'x'/'y'.
Definition: sparse.c:128
int BM_file_write(FILE *, struct BM *)
Write bitmap out to file.
Definition: bitmap.c:269
int BM_dump_map_sparse(struct BM *)
Debugging code to dump out structure of links.
Definition: sparse.c:302
int BM_destroy_sparse(struct BM *)
Destroy sparse bitmap and free all associated memory.
Definition: sparse.c:90
int BM_get(struct BM *, int, int)
Gets 'val' from the bitmap.
Definition: bitmap.c:220
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:364
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:246
size_t BM_get_map_size_sparse(struct BM *)
Returns size of sparse bitmap in bytes.
Definition: sparse.c:272