30 mask_name[strlen(mask_name) - 2] =
'g';
32 mask = fopen(mask_name,
"wb");
34 G_fatal_error(
_(
"Cairo: unable to open mask file <%s>"), mask_name);
42 const unsigned int *row =
46 unsigned int c = row[
x];
47 int a = (c >> 24) & 0xFF;
48 int r = (c >> 16) & 0xFF;
49 int g = (c >> 8) & 0xFF;
50 int b = (c >> 0) & 0xFF;
52 if (a > 0 && a < 0xFF) {
58 fputc((
unsigned char)
r,
output);
59 fputc((
unsigned char)
g,
output);
60 fputc((
unsigned char)
b,
output);
61 fputc((
unsigned char)a, mask);
void cairo_write_ppm(void)
GRASS cairo display driver - header file.
void G_free(void *)
Free allocated memory.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
char * G_store(const char *)
Copy string to allocated memory.
void output(const char *fmt,...)