10 const char *
type =
true_color ? (mask ?
"RASTERRGBMASK" :
"RASTERRGB")
11 : (mask ?
"RASTERGRAYMASK" :
"RASTERGRAY");
13 int ssx = src[0][1] - src[0][0];
14 int ssy = src[1][1] - src[1][0];
18 int dsx = dst[0][1] - dst[0][0];
19 int dsy = dst[1][1] - dst[1][0];
26 output(
"%d %d translate %d %d scale\n", dox, doy, dsx, dsy);
27 output(
"%d %d [%d 0 0 %d %d %d] %s\n", ssx, ssy, ssx, ssy, sox, soy,
32 const unsigned char *red,
const unsigned char *grn,
33 const unsigned char *blu,
const unsigned char *nul)
37 for (i = 0; i <
n; i++) {
40 output(
"%02X%02X%02X%02X", (nul && nul[i]) ? 0xFF : 0x00,
41 red[i], grn[i], blu[i]);
43 output(
"%02X%02X%02X", red[i], grn[i], blu[i]);
47 (
unsigned int)(red[i] * 0.299 + grn[i] * 0.587 +
51 output(
"%02X%02X", (nul && nul[i]) ? 0xFF : 0x00, gray);
void PS_begin_scaled_raster(int, int[2][2], int[2][2])
int PS_scaled_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
void PS_end_scaled_raster(void)
void output(const char *fmt,...)