Leptonica
1.54
|
Макросы | |
#define | COMBINE_PARTIAL(d, s, m) ( ((d) & ~(m)) | ((s) & (m)) ) |
Функции | |
void | rasteropVipLow (l_uint32 *data, l_int32 pixw, l_int32 pixh, l_int32 depth, l_int32 wpl, l_int32 x, l_int32 w, l_int32 shift) |
void | rasteropHipLow (l_uint32 *data, l_int32 pixh, l_int32 depth, l_int32 wpl, l_int32 y, l_int32 h, l_int32 shift) |
void | shiftDataHorizontalLow (l_uint32 *datad, l_int32 wpld, l_uint32 *datas, l_int32 wpls, l_int32 shift) |
Переменные | |
static const l_uint32 | lmask32 [] |
static const l_uint32 | rmask32 [] |
#define COMBINE_PARTIAL | ( | d, | |
s, | |||
m | |||
) | ( ((d) & ~(m)) | ((s) & (m)) ) |
void rasteropHipLow | ( | l_uint32 * | data, |
l_int32 | pixh, | ||
l_int32 | depth, | ||
l_int32 | wpl, | ||
l_int32 | y, | ||
l_int32 | h, | ||
l_int32 | shift | ||
) |
Input: data (ptr to image data) pixh (height) depth (depth) wpl (wpl) y (y val of UL corner of rectangle) h (height of rectangle) shift (+ shifts data to the left in a horizontal column) Return: 0 if OK; 1 on error.
Notes: (1) This clears the pixels that are left exposed after the rasterop. Therefore, for Pix with depth > 1, these pixels become black, and must be subsequently SET if they are to be white. For example, see pixRasteropHip(). (2) This function performs clipping and calls shiftDataHorizontalLine() to do the in-place rasterop on each line.
void rasteropVipLow | ( | l_uint32 * | data, |
l_int32 | pixw, | ||
l_int32 | pixh, | ||
l_int32 | depth, | ||
l_int32 | wpl, | ||
l_int32 | x, | ||
l_int32 | w, | ||
l_int32 | shift | ||
) |
Input: data (ptr to image data) pixw (width) pixh (height) depth (depth) wpl (wpl) x (x val of UL corner of rectangle) w (width of rectangle) shift (+ shifts data downward in vertical column) Return: 0 if OK; 1 on error.
Notes: (1) This clears the pixels that are left exposed after the translation. You can consider them as pixels that are shifted in from outside the image. This can be later overridden by the incolor parameter in higher-level functions that call this. For example, for images with depth > 1, these pixels are cleared to black; to be white they must later be SET to white. See, e.g., pixRasteropVip(). (2) This function scales the width to accommodate any depth, performs clipping, and then does the in-place rasterop.
void shiftDataHorizontalLow | ( | l_uint32 * | datad, |
l_int32 | wpld, | ||
l_uint32 * | datas, | ||
l_int32 | wpls, | ||
l_int32 | shift | ||
) |
Input: datad (ptr to beginning of dest line) wpld (wpl of dest) datas (ptr to beginning of src line) wpls (wpl of src) shift (horizontal shift of block; >0 is to right) Return: void
Notes: (1) This can also be used for in-place operation; see, e.g., rasteropHipLow(). (2) We are clearing the pixels that are shifted in from outside the image. This can be overridden by the incolor parameter in higher-level functions that call this.
{0x0, 0x80000000, 0xc0000000, 0xe0000000, 0xf0000000, 0xf8000000, 0xfc000000, 0xfe000000, 0xff000000, 0xff800000, 0xffc00000, 0xffe00000, 0xfff00000, 0xfff80000, 0xfffc0000, 0xfffe0000, 0xffff0000, 0xffff8000, 0xffffc000, 0xffffe000, 0xfffff000, 0xfffff800, 0xfffffc00, 0xfffffe00, 0xffffff00, 0xffffff80, 0xffffffc0, 0xffffffe0, 0xfffffff0, 0xfffffff8, 0xfffffffc, 0xfffffffe, 0xffffffff}
{0x0, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff, 0x0001ffff, 0x0003ffff, 0x0007ffff, 0x000fffff, 0x001fffff, 0x003fffff, 0x007fffff, 0x00ffffff, 0x01ffffff, 0x03ffffff, 0x07ffffff, 0x0fffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff}