Example #1
0
int color(IplImage *img,int *lines_number, struct rect_char *chars, int
        size_l,int size_c)
{

    for (int i = 0 ; i < size_l; i++)
        color_line(img,lines_number[i]);

    for (int j = 0 ; j <size_c ; j++)
    {

        color_column(img,chars[j]);
    }

    return 0;

}
Example #2
0
static void printpage (const char *line, int *index, RRegexMatch **ms,
		       int from, int to, int w) {
	int i;
	RStrpool *p;

	r_cons_clear00 ();
	if (from <0 || to <0) {
		return;
	}
	p = r_strpool_new(0);
	for (i=from; i<to; i++) {
		color_line(line + index[i], p, ms[i]);
		r_strpool_ansi_chop(p, w);
		r_cons_reset_colors();
		r_cons_printf ("%s\n", p->str);
	}
	r_strpool_free(p);
	r_cons_flush ();
}