GRASS 8 Programmer's Manual 8.6.0dev(2026)-fc1694ea64
Loading...
Searching...
No Matches
defs/bitmap.h
Go to the documentation of this file.
1#ifndef GRASS_BITMAPDEFS_H
2#define GRASS_BITMAPDEFS_H
3
4/* bitmap.c */
5struct BM *BM_create(int, int);
6int BM_destroy(struct BM *);
7int BM_set_mode(int, int);
8int BM_set(struct BM *, int, int, int);
9int BM_get(struct BM *, int, int);
10size_t BM_get_map_size(struct BM *);
11int BM_file_write(FILE *, struct BM *);
12struct BM *BM_file_read(FILE *);
13
14/* sparse.c */
15struct BM *BM_create_sparse(int, int);
16int BM_destroy_sparse(struct BM *);
17int BM_set_sparse(struct BM *, int, int, int);
18int BM_get_sparse(struct BM *, int, int);
19size_t BM_get_map_size_sparse(struct BM *);
20int BM_dump_map_sparse(struct BM *);
21int BM_dump_map_row_sparse(struct BM *, int);
22int 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:213
int BM_file_write(FILE *, struct BM *)
Write bitmap out to file.
Definition bitmap.c:258
struct BM * BM_file_read(FILE *)
Create map structure and load it from file.
Definition bitmap.c:299
int BM_dump_map_row_sparse(struct BM *, int)
Debugging code to dump out structure of links for single row.
Definition sparse.c:316
int BM_destroy(struct BM *)
Destroy bitmap and free all associated memory.
Definition bitmap.c:88
size_t BM_get_map_size(struct BM *)
Returns size in bytes that bitmap is taking up.
Definition bitmap.c:236
int BM_set(struct BM *, int, int, int)
Sets bitmap value to 'val' at location 'x' 'y'.
Definition bitmap.c:182
int BM_set_sparse(struct BM *, int, int, int)
Set sparse bitmap value to 'val' at location 'x'/'y'.
Definition sparse.c:122
struct BM * BM_create_sparse(int, int)
Create a sparse bitmap of dimension 'x'/'y'.
Definition sparse.c:41
size_t BM_get_map_size_sparse(struct BM *)
Returns size of sparse bitmap in bytes.
Definition sparse.c:260
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:346
int BM_dump_map_sparse(struct BM *)
Debugging code to dump out structure of links.
Definition sparse.c:288
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:145
int BM_get_sparse(struct BM *, int, int)
Returns sparse bitmap value at location 'x'/'y'.
Definition sparse.c:236
int BM_destroy_sparse(struct BM *)
Destroy sparse bitmap and free all associated memory.
Definition sparse.c:86
struct BM * BM_create(int, int)
Create bitmap of dimension x/y and return structure token.
Definition bitmap.c:57
Definition bitmap.h:17