24 int i_width, i_height, maxval;
31 if (fscanf(input,
"P6 %d %d %d", &i_width, &i_height, &maxval) != 3)
39 "expected: %dx%d got: %dx%d"),
42 mask_name[strlen(mask_name) - 2] =
'g';
44 mask = fopen(mask_name,
"rb");
49 if (fscanf(mask,
"P5 %d %d %d", &i_width, &i_height, &maxval) != 3)
56 G_fatal_error(
_(
"Cairo: input mask file has incorrect dimensions: " 57 "expected: %dx%d got: %dx%d"),
65 for (x = 0; x <
ca.
width; x++) {
76 if (a > 0 && a < 0xFF) {
82 row[
x] = (a << 24) | (r << 16) | (g << 8) | (b << 0);
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_free(void *)
Free allocated memory.
GRASS cairo display driver - header file.
void cairo_read_ppm(void)
char * G_store(const char *)
Copy string to allocated memory.