|
GRASS GIS 8 Programmer's Manual
8.4.2dev(2025)-5620950973
|
#include <stdio.h>#include <stdlib.h>#include <grass/linkm.h>#include <grass/bitmap.h>
Go to the source code of this file.
Macros | |
| #define | BM_col_to_byte(x) ((x) >> 3) /* x / 8 */ |
| #define | BM_col_to_bit(x) ((x)&7) /* x % 8 */ |
Functions | |
| struct BM * | BM_create_sparse (int x, int y) |
| Create a sparse bitmap of dimension 'x'/'y'. More... | |
| int | BM_destroy_sparse (struct BM *map) |
| Destroy sparse bitmap and free all associated memory. More... | |
| int | BM_set_sparse (struct BM *map, int x, int y, int val) |
| Set sparse bitmap value to 'val' at location 'x'/'y'. More... | |
| int | BM_get_sparse (struct BM *map, int x, int y) |
| Returns sparse bitmap value at location 'x'/'y'. More... | |
| size_t | BM_get_map_size_sparse (struct BM *map) |
| Returns size of sparse bitmap in bytes. More... | |
| int | BM_dump_map_sparse (struct BM *map) |
| Debugging code to dump out structure of links. More... | |
| int | BM_dump_map_row_sparse (struct BM *map, int y) |
| Debugging code to dump out structure of links for single row. More... | |
| int | BM_file_write_sparse (FILE *fp, struct BM *map) |
| Write sparse bitmap matrix out to disk file 'fp'. NOTE: 'fp' must already be opened and later closed by user. More... | |
| struct BM* BM_create_sparse | ( | int | x, |
| int | y | ||
| ) |
Create a sparse bitmap of dimension 'x'/'y'.
Returns bitmap structure or NULL on error
| x | |
| y |
Definition at line 42 of file sparse.c.
References count, link_init(), link_new(), link_set_chunk_size(), NULL, and x.
Referenced by main().
| int BM_destroy_sparse | ( | struct BM * | map | ) |
Destroy sparse bitmap and free all associated memory.
Returns 0
| map |
Definition at line 88 of file sparse.c.
References link_dispose(), NULL, and VOID_T.
Referenced by BM_destroy().
| int BM_dump_map_row_sparse | ( | struct BM * | map, |
| int | y | ||
| ) |
| int BM_dump_map_sparse | ( | struct BM * | map | ) |
| int BM_file_write_sparse | ( | FILE * | fp, |
| struct BM * | map | ||
| ) |
| size_t BM_get_map_size_sparse | ( | struct BM * | map | ) |
Returns size of sparse bitmap in bytes.
| map |
Definition at line 265 of file sparse.c.
References NULL.
Referenced by BM_get_map_size().
| int BM_get_sparse | ( | struct BM * | map, |
| int | x, | ||
| int | y | ||
| ) |
| int BM_set_sparse | ( | struct BM * | map, |
| int | x, | ||
| int | y, | ||
| int | val | ||
| ) |
Set sparse bitmap value to 'val' at location 'x'/'y'.
Returns 0
| map | |
| x | |
| y | |
| val |
Definition at line 125 of file sparse.c.
References cur_x, link_dispose(), link_new(), NULL, VOID_T, and x.
Referenced by BM_set().