src/pixacc.c
PIXACC *
pixaccCreate(l_int32  w,
             l_int32  h,
             l_int32  negflag)
{
PIXACC  *pixacc;

    PROCNAME("pixaccCreate");

    if ((pixacc = (PIXACC *)CALLOC(1, sizeof(PIXACC))) == NULL)
        return (PIXACC *)ERROR_PTR("pixacc not made", procName, NULL);
    pixacc->w = w;
    pixacc->h = h;
    
    if ((pixacc->pix = pixCreate(w, h, 32)) == NULL)
        return (PIXACC *)ERROR_PTR("pix not made", procName, NULL);

    if (negflag) {
        pixacc->offset = 0x40000000;
        pixSetAllArbitrary(pixacc->pix, pixacc->offset);
    }

    return pixacc;
}
/*!
 *  pixaccCreate()
 *
 *      Input:  w, h (of 32 bpp internal Pix)
 *              negflag (0 if only positive numbers are involved;
 *                       1 if there will be negative numbers)
 *      Return: pixacc, or null on error
 *
 *  Notes:
 *      (1) Use @negflag = 1 for safety if any negative numbers are going
 *          to be used in the chain of operations.  Negative numbers
 *          arise, e.g., by subtracting a pix, or by adding a pix
 *          that has been pre-multiplied by a negative number.
 *      (2) Initializes the internal 32 bpp pix, similarly to the
 *          initialization in pixInitAccumulate().
 */
pixaccCreate()
Input:  w, h (of 32 bpp internal Pix)
negflag (0 if only positive numbers are involved;
1 if there will be negative numbers)
Return: pixacc, or null on error

(1) Use @negflag = 1 for safety if any negative numbers are going
to be used in the chain of operations.  Negative numbers
arise, e.g., by subtracting a pix, or by adding a pix
that has been pre-multiplied by a negative number.
(2) Initializes the internal 32 bpp pix, similarly to the
initialization in pixInitAccumulate().
pixaccCreate () Input : w h ( of 32 bpp internal Pix ) negflag ( 0 if only positive numbers are involved ; 1 if there will be negative numbers ) Return : pixacc or null on error ( 1 ) Use @negflag = 1 for safety if any negative numbers are going to be used in the chain of operations . Negative numbers arise e . g . by subtracting a pix or by adding a pix that has been pre - multiplied by a negative number . ( 2 ) Initializes the internal 32 bpp pix similarly to the initialization in pixInitAccumulate () .
PIXACC *
pixaccCreate(l_int32  w,
             l_int32  h,
             l_int32  negflag)
{
PIXACC  *pixacc;
    PROCNAME("pixaccCreate");
    if ((pixacc = (PIXACC *)CALLOC(1, sizeof(PIXACC))) == NULL)
        return (PIXACC *)ERROR_PTR("pixacc not made", procName, NULL);
    pixacc->w = w;
    pixacc->h = h;
    if ((pixacc->pix = pixCreate(w, h, 32)) == NULL)
        return (PIXACC *)ERROR_PTR("pix not made", procName, NULL);
    if (negflag) {
        pixacc->offset = 0x40000000;
        pixSetAllArbitrary(pixacc->pix, pixacc->offset);
    }
    return pixacc;
}
PIXACC * pixaccCreate ( l_int32 w , l_int32 h , l_int32 negflag ) { PIXACC * pixacc ; PROCNAME ( " " ) ; if ( ( pixacc = ( PIXACC * ) CALLOC ( 1 , sizeof ( PIXACC ) ) ) == NULL ) return ( PIXACC * ) ERROR_PTR ( " " , procName , NULL ) ; pixacc -> w = w ; pixacc -> h = h ; if ( ( pixacc -> pix = pixCreate ( w , h , 32 ) ) == NULL ) return ( PIXACC * ) ERROR_PTR ( " " , procName , NULL ) ; if ( negflag ) { pixacc -> offset = 0x40000000 ; pixSetAllArbitrary ( pixacc -> pix , pixacc -> offset ) ; } return pixacc ; }
pixaccCreate()
      Input:  w, h (of 32 bpp internal Pix)
              negflag (0 if only positive numbers are involved;
                       1 if there will be negative numbers)
      Return: pixacc, or null on error
pixaccCreate () Input : w h ( of 32 bpp internal Pix ) negflag ( 0 if only positive numbers are involved ; 1 if there will be negative numbers ) Return : pixacc or null on error