50#include <config_auto.h>
54#include "allheaders.h"
57 l_int32 dy, l_int32 dw, l_int32 dh);
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);
446 return (
PIX *)ERROR_PTR(
"pixs not defined", __func__, NULL);
449 if ((pixd = pixCopy(pixd, pixs)) == NULL)
450 return (
PIX *)ERROR_PTR(
"pixd not made", __func__, NULL);
475 return ERROR_INT(
"pixd not defined", __func__, 1);
477 pixGetDimensions(pixd, &w, &h, NULL);
511 return ERROR_INT(
"pixd not defined", __func__, 1);
513 return ERROR_INT(
"pixs not defined", __func__, 1);
515 pixRasterop(pixd, 0, 0, pixGetWidth(pixd), pixGetHeight(pixd), op,
548 if (pixw < 1 || pixh < 1 || w < 1 || h < 1)
549 return ERROR_INT(
"dimension is <= 0", __func__, 1);
551 if (x + w <= 0 || y + h <= 0)
552 return ERROR_INT(
"box to left or above pix", __func__, 1);
554 if (x >= pixw || y >= pixh)
555 return ERROR_INT(
"box to right or below pix", __func__, 1);
l_ok pixRasteropHip(PIX *pixd, l_int32 by, l_int32 bh, l_int32 hshift, l_int32 incolor)
pixRasteropHip()
l_ok pixRasteropIP(PIX *pixd, l_int32 hshift, l_int32 vshift, l_int32 incolor)
pixRasteropIP()
l_ok pixRasteropFullImage(PIX *pixd, PIX *pixs, l_int32 op)
pixRasteropFullImage()
PIX * pixTranslate(PIX *pixd, PIX *pixs, l_int32 hshift, l_int32 vshift, l_int32 incolor)
pixTranslate()
l_ok pixRasteropVip(PIX *pixd, l_int32 bx, l_int32 bw, l_int32 vshift, l_int32 incolor)
pixRasteropVip()
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()