214l_int32 dpw, dph, dpd, spw, sph, spd;
217 return ERROR_INT(
"pixd not defined", __func__, 1);
222 pixGetDimensions(pixd, &dpw, &dph, &dpd);
225 L_WARNING(
"dest crop box out of bounds\n", __func__);
232 rasteropUniLow(pixGetData(pixd), dpw, dph, dpd, pixGetWpl(pixd),
239 return ERROR_INT(
"pixs not defined", __func__, 1);
240 pixGetDimensions(pixs, &spw, &sph, &spd);
242 return ERROR_INT(
"depths of pixs and pixd differ", __func__, 1);
245 L_WARNING(
"source crop box out of bounds\n", __func__);
250 rasteropLow(pixGetData(pixd), dpw, dph, dpd, pixGetWpl(pixd),
252 pixGetData(pixs), spw, sph, pixGetWpl(pixs), sx, sy);
287l_int32 w, h, d, index, op;
292 return ERROR_INT(
"pixd not defined", __func__, 1);
294 return ERROR_INT(
"invalid value for incolor", __func__, 1);
296 return ERROR_INT(
"bw must be > 0", __func__, 1);
301 pixGetDimensions(pixd, &w, &h, &d);
302 rasteropVipLow(pixGetData(pixd), w, h, d, pixGetWpl(pixd), bx, bw, vshift);
304 cmap = pixGetColormap(pixd);
314 pixRasterop(pixd, bx, 0, bw, vshift, op, NULL, 0, 0);
316 pixRasterop(pixd, bx, h + vshift, bw, -vshift, op, NULL, 0, 0);
322 pixcmapGetRankIntensity(cmap, 0.0, &index);
324 pixcmapGetRankIntensity(cmap, 1.0, &index);
325 pixt = pixCreate(bw, L_ABS(vshift), d);
326 pixSetAllArbitrary(pixt, index);
363l_int32 w, h, d, index, op;
368 return ERROR_INT(
"pixd not defined", __func__, 1);
370 return ERROR_INT(
"invalid value for incolor", __func__, 1);
372 return ERROR_INT(
"bh must be > 0", __func__, 1);
377 pixGetDimensions(pixd, &w, &h, &d);
378 rasteropHipLow(pixGetData(pixd), h, d, pixGetWpl(pixd), by, bh, hshift);
380 cmap = pixGetColormap(pixd);
390 pixRasterop(pixd, 0, by, hshift, bh, op, NULL, 0, 0);
392 pixRasterop(pixd, w + hshift, by, -hshift, bh, op, NULL, 0, 0);
398 pixcmapGetRankIntensity(cmap, 0.0, &index);
400 pixcmapGetRankIntensity(cmap, 1.0, &index);
401 pixt = pixCreate(L_ABS(hshift), bh, d);
402 pixSetAllArbitrary(pixt, index);
475 return ERROR_INT(
"pixd not defined", __func__, 1);
477 pixGetDimensions(pixd, &w, &h, NULL);
PIX * pixTranslate(PIX *pixd, PIX *pixs, l_int32 hshift, l_int32 vshift, l_int32 incolor)
pixTranslate()
static l_int32 checkRasteropCrop(l_int32 pixw, l_int32 pixh, l_int32 dx, l_int32 dy, l_int32 dw, l_int32 dh)
checkRasteropCrop()
l_ok pixRasterop(PIX *pixd, l_int32 dx, l_int32 dy, l_int32 dw, l_int32 dh, l_int32 op, PIX *pixs, l_int32 sx, l_int32 sy)
pixRasterop()